How to fix
How to fix buttons with no accessible name
A button a screen reader announces as just "button" is a dead end. This is common with icon-only buttons. Here is how to give each one a name without changing your design.
Why this fails
WCAG 4.1.2 Name, Role, Value requires every button to expose a name that says what it does. The usual failures are icon-only buttons, the hamburger menu, search, close (×), play, and similar, where the button contains only an icon or SVG with no text. Assistive technology then has nothing to announce.
How to fix it
The simplest fix, if it suits the design, is visible text inside the button. When the button must stay icon-only, give it an accessible name with aria-label and hide the icon from assistive tech:
<button aria-label="Open menu">
<svg aria-hidden="true">...</svg>
</button>
An alternative is visually hidden text inside the button, which some teams prefer because it survives translation:
<button>
<svg aria-hidden="true">...</svg>
<span class="sr-only">Open menu</span>
</button>
If you are using a <div> or <span> as a button, switch it to a real <button> so it also gets the correct role and keyboard behaviour.
Check it across your site
Run the free scan above to list every button with no accessible name, with the element shown. Add the name, then re-scan. The same checks run as a browser extension and a CI gate, so a new icon button cannot ship unnamed.
Frequently asked questions
How do I name an icon-only button?
Add an aria-label describing the action ("Open menu", "Close", "Search"), and mark the icon aria-hidden="true" so it is not announced separately.
What is the difference between aria-label and visually hidden text?
Both give an accessible name. aria-label is simpler; visually hidden text is real DOM text, which can be more robust for translation. Either is fine.
Should I use a div as a button?
No. Use a real <button>. It comes with the correct role, keyboard support, and focus behaviour that a styled <div> does not.
Which WCAG criterion does this cover?
4.1.2 Name, Role, Value, which requires interactive elements to expose an accessible name and role.
Related guides
See what's actually broken on your site
Real axe-core results, every element outlined. No email wall, no fake “compliant” badge.
Run a free scanLast updated 2026-06-26.