Labels or Instructions
Every field that takes input needs a label or an instruction, and the rule means every field rather than only the required ones. Word it however your design needs. A visible text label, a magnifier icon serving as the label for a search box, a legend over a group of boxes, or an instruction above the form all count. What does not count on its own is placeholder text, because a placeholder disappears the moment somebody types into it, and a label that vanishes when it is used is no longer presented to the user. Format requirements belong here too. If a password needs 12 characters, say so before the user picks one, not after they have picked three.
Why it matters
A form built on placeholders erases its own instructions as you follow them. Type into the field and the label goes. By halfway down, every field you have answered is an anonymous box with no way to check what it asked for, which is exactly when somebody with a memory or attention difficulty needs to check. Stating the format up front instead of revealing it through an error message afterwards is the difference between guiding somebody and marking their work. The business reason sits right next to the human one. A user who knows the rules before they type does not submit, fail, and come back.
Who this rule protects
Users with cognitive disabilities lose the instruction the instant its placeholder disappears, and they are the people least able to rebuild it from memory. Screen reader users meet a field that was never labeled at all. People with low vision struggle with placeholder text in particular, since browsers usually render it at a contrast that would fail the contrast rule if it were ordinary text. And everybody guesses at date formats nobody stated.
How to check it yourself
- Fill in each form yourself and watch what happens to the labels as you type. Anything that disappears was not a label.
- Check optional fields as well as required ones. The rule reaches every field that accepts input, and the word requires in its text does not mean required fields.
- Look for the format rules before you make a mistake rather than after. Password rules, date formats and phone formats all have to be visible before submission.
- Check the options inside a control, not just the control. Every radio, every checkbox and every option in a combobox needs its own label.
- Put general instructions before the form element in the source, since screen readers switch into a mode inside a form that reads the controls and skips the ordinary text between them.
Failures we see most often
- A placeholder-only form turns into a memory quiz once it is half filled in, because every field already answered has lost its label.
- Password rules arrive one at a time through error messages, so the user learns the requirements by failing them.
- Three boxes hold an area code, an exchange and a number, and nothing says the group is a phone number. That is W3C's own named failure for this rule, and it holds even when all three boxes carry proper accessible names.
- A date field takes a date and says nothing about which order it wants the parts in, so half the traffic gets it wrong and the other half was lucky.
- The instructions sit inside the form element between the fields, so a screen reader in forms mode reads straight past them.
Who this one is for
Read from this rule's own note above, so the grouping and the note cannot disagree.
- Blind and screen reader userspeople who cannot see the screen
- Low visionpeople who can see the screen but not easily
- Cognitive and learningpeople for whom the difficulty is understanding, remembering, or staying with it
How to fix it
- Give every field a real label element and keep it on screen. Use the placeholder for an actual example, such as Apple Pie in a search box that already has a Search label above it.
- State the format where the user will need it, which is before they type. A password needs at least 12 characters is one sentence and it saves a round trip.
- Group split fields in a fieldset with a legend naming the whole thing, and label the parts individually. Where the design has no room for visible sub-labels, invisible ones on the parts are acceptable as long as the group is visibly named.
- Say less rather than more once the essentials are covered. Too much instruction is as harmful as too little, and a form crowded with help text is a barrier of its own.
Step-by-step fix guides (17)
- H44: Attach a real label to every form field
- H90: Mark required fields in the label itself
- H71: Group related form fields with fieldset and legend
- ARIA1: Attach help text to inputs with aria-describedby
- ARIA2: Tell screen readers a field is requiredAdvisory
- ARIA9: Assemble one label from several text pieces
- ARIA17: Group related form fields with ARIA roles
- G13: Say what a control will do before it does it
- G83: Tell users which required fields they missed
- G89: Show the expected format with an example
- G131: Write labels that describe their fields
- G162: Position labels where users expect them
- G167: Label fields with their adjacent buttons
- G184: State form requirements before the fields
- PDF5: Mark required fields in PDF forms
- PDF10: Label every field in your PDF forms
Passes vs. fails
Passes
Labels sit above their fields and stay there, the ZIP field shows the format it wants, and the placeholder holds an example rather than the label.
Fails
Every label on the form is placeholder text, so by the middle of it each answered field is a box with something in it and nothing to say what it was for.
In audits and lawsuits
Placeholder-as-label is the design trend we still find on most unaudited sites, and it is also the clearest case of a scanner and an auditor disagreeing about the same field. Here is why they disagree. The name computation lets a placeholder stand in as a control's accessible name when nothing better exists, so a placeholder-only field passes an automated name check cleanly. What it fails is this rule, which asks whether a label is presented to all users rather than whether a name exists somewhere. This rule has no automated test rule at all, so when a scan report says a form field has no accessible name, that finding belongs to 4.1.2 rather than to this one. Two more lines we keep straight. Whether the label is wired to the field is 1.3.1. Whether the label is any good is 2.4.6. This rule only asks whether a label or an instruction is there.