Skip to main content
Checks that elements have required ARIA attributes for their roles
Rule IDa11y/aria-required-attr
CategoryAccessibility
ScopePer-page
Severityerror
Weight7/10

Solution

Some ARIA roles require specific attributes to be present. For example, role=‘checkbox’ requires aria-checked, role=‘slider’ requires aria-valuenow. Add the missing required attributes with appropriate values.

Enable / Disable

Disable this rule

squirrel.toml
[rules]
disable = ["a11y/aria-required-attr"]

Disable all Accessibility rules

squirrel.toml
[rules]
disable = ["a11y/*"]

Enable only this rule

squirrel.toml
[rules]
enable = ["a11y/aria-required-attr"]
disable = ["*"]