molily: HTML5 Strucktur

Beitrag lesen

»When done, I hit the tab key and the keyboard focus (and my focus) is moved to the next field.
Puzzlement strikes. The placeholder text is gone, there is no label, and I am left with a blank field eagerly awaiting my input on … something… anything?«

http://mentalized.net/journal/2010/08/05/dont_use_placeholder_text_as_labels/

»The problem is that the first input box you’ll click into is the top title input. It actually auto-focuses, and some clever script means that it puts the label back in after the auto-focus, but then the second you start typing you’ve lost that label. If you start typing, then backspace because you made a mistake, you’ve lost that label«

http://laurakalbag.com/labels-in-input-fields-arent-such-a-good-idea/

Ich weiß nicht, wie die auf diese Erfahrung kommen – so ist das HTML5-placeholder-Attribut nicht in den mir verfügbaren Browsern implementiert. Selbst wenn ein Feld fokussiert ist, ist der Placeholder solange sichtbar, bis Text eingegeben wurde; und er wird auch wieder sichtbar, wenn man den Inhalt löscht. Damit bricht deren zentrale Argumentation zusammen.

Placeholder-als-Label wird übrigens z.B. von iOS in nativen Apps verwendet, und ich meine es auch auf Android gesehen zu haben. Es spricht wenig prinzipiell gegen dieses UI-Pattern. Ein separates Label ist natürlich robuster aus Usability-Sicht, und im HTML-Kontext nötig aus Accessibility-Sicht.

Mathias