squirrelscan
GitHub

Button Name

Checks that all buttons have accessible names

Checks that all buttons have accessible names

Rule ID a11y/button-name
Category Accessibility
Scope Per-page
Severity error
Weight 8/10

Solution

Buttons must have accessible names. Options: 1) Add text content inside the button. 2) Use aria-label for icon buttons. 3) Use aria-labelledby to reference visible text. 4) Use title attribute (less preferred). For <input type='button'>, use the value attribute.

Enable / Disable

Disable this rule

[rules]
disable = ["a11y/button-name"]

Disable all Accessibility rules

[rules]
disable = ["a11y/*"]

Enable only this rule

[rules]
enable = ["a11y/button-name"]
disable = ["*"]

Type to search…

↑↓ navigate↵ openesc close