ARIA Toggle Field Name
Checks that toggle fields (checkbox, radio, switch) have accessible names
Checks that toggle fields (checkbox, radio, switch) have accessible names
| Rule ID | a11y/aria-toggle-field-name |
| Category | Accessibility |
| Scope | Per-page |
| Severity | error |
| Weight | 7/10 |
Solution
Toggle fields need accessible names to describe what they control. Use <label for='id'>, aria-label, aria-labelledby, or wrap in <label>. Example: <label>``<input type='checkbox'> Subscribe to newsletter</label>
Enable / Disable
Disable this rule
squirrel.toml
toml[rules]
disable = ["a11y/aria-toggle-field-name"]Disable all Accessibility rules
squirrel.toml
toml[rules]
disable = ["a11y/*"]Enable only this rule
squirrel.toml
toml[rules]
enable = ["a11y/aria-toggle-field-name"]
disable = ["*"]