Repository navigation
Web HIG tip #4: Placeholders are not labels #12
frozonfreak
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Web HIG tip #4: Placeholders are not labels
A placeholder looks like a label right up until the user starts typing. Then the only hint about what the field wants is gone.
Web HIG tip #4 (Quick #50, #55, #80): Every form field needs a visible, associated label. Placeholders are not labels.
Why it matters
Placeholder-only fields look clean in a mockup and fail in real use:
The rule of thumb
Ask: if the field is filled in, can someone still tell what it's for?
If not, it needs a real label.
A placeholder can still help with an example format, like
name@example.com. It just can't be the only thing telling people what the field is.Do this instead
<label>linked withforandid, or wrap the input inside the labelaria-describedbytypeandautocompleteso browsers and password managers can helpQuick check for your app
Fill in one form completely, then read it back without clicking anything. Every field should still say what it is. Then run a screen reader across the form: each field should be announced by its label, along with any hint or error attached to it.
The Web HIG is a behavioral contract for how the web should behave, not a component library. Design systems define look. The Web HIG defines behave.
All reactions