| Rule ID | a11y/form-labels |
| Category | Accessibility |
| Scope | Per-page |
| Severity | error |
| Weight | 6/10 |
Solution
Every form input needs an accessible label for screen readers. Options: 1) Use<label for='inputId'>Label</label> with matching id. 2) Wrap the input inside <label>Label <input>``</label>. 3) Use aria-label or aria-labelledby for inputs where visible labels aren’t feasible. Placeholders are not sufficient substitutes for labels. Hidden inputs, submit buttons, and image buttons don’t need labels.
Enable / Disable
Disable this rule
squirrel.toml
Disable all Accessibility rules
squirrel.toml
Enable only this rule
squirrel.toml