Rule
Form field labels
Every form field needs a label.
- Rule
form-label- WCAG 2.2
- 1.3.1 Info and Relationships (opens in a new tab) (Level A)
3.3.2 Labels or Instructions (opens in a new tab) (Level A)
4.1.2 Name, Role, Value (opens in a new tab) (Level A) - Severity
- Critical
What it checks
Every text field, checkbox, radio button, <select> and <textarea> needs a label: a visible <label>, an aria-label, or aria-labelledby. A field with none fails.
The rule also fails the common near misses: a placeholder used as the only label, which disappears once someone types; a label hidden with display: none or visibility: hidden; a label inside aria-hidden="true", which sighted users see but screen readers lose; an empty label; and a label whose for points at an id an earlier element already uses.
When a person decides
A field named only by its title attribute is sent for review. A title is a recognised way to name a field, but it only shows on hover, so a person needs to judge whether a visible label is needed.
Example
Fails
<input type="email" name="email" placeholder="Email address">
Passes
<label for="email">Email address</label>
<input type="email" id="email" name="email" placeholder="name@example.com">
The engine is tested against both examples.
How to fix it
Add a visible <label for="…"> that matches the field's id, or wrap the field in its label. Keep any placeholder as an example value.
Check your own pages
This rule runs in every pour audit: the browser extension, the bookmarklet, the command line and the editor. Get pour, free.