Skip to content

Rule · Accessibility

Button has no accessible name

a11y/button-nameerrorvoid a11yupdated

Why it matters

Icon-only buttons without a label are announced as just "button", so screen-reader users cannot tell what they do.

How to fix it

Give the button visible text, aria-label, or visually-hidden text.

Example

tsx
<button aria-label="Close dialog"><svg aria-hidden="true">…</svg></button>

References

void a11y reports 48 rules in this category. WCAG 2.2 AA through axe-core, plus checks axe can't do alone: visible keyboard focus, 24/44px target size on mobile, 320px reflow and disabled zoom.