Skip to content

Rule · Accessibility

Form field has no label

a11y/labelerrorvoid a11yupdated

Why it matters

Without a programmatic label, assistive tech cannot say what to type and clicking the label won't focus the field.

How to fix it

Associate a <label for> with the input, or wrap the input in the label. Placeholder is not a label.

Example

tsx
<label for="email">Email</label><input id="email" type="email" autocomplete="email">

References

void a11y reports 48 rules in this category. WCAG 2.2 AA through axe-core, plus checks axe can't do alone: visible keyboard focus, 24/44px target size on mobile, 320px reflow and disabled zoom.