Skip to main content
Checks that command elements have accessible names
Rule IDa11y/aria-command-name
CategoryAccessibility
ScopePer-page
Severityerror
Weight7/10

Solution

Command elements (buttons, links, menu items) must have accessible names. Add text content, aria-label, aria-labelledby, or title attribute. For icon-only buttons, use aria-label to describe the action (e.g., aria-label=‘Close’).

Enable / Disable

Disable this rule

squirrel.toml
[rules]
disable = ["a11y/aria-command-name"]

Disable all Accessibility rules

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

Enable only this rule

squirrel.toml
[rules]
enable = ["a11y/aria-command-name"]
disable = ["*"]