ARIA buttons, links and menu items must have an accessible name
Elements with `role="button"`, `role="link"` or `role="menuitem"` need an accessible name, so people using assistive technology know what each command does.
| Rule ID | aria-command-name |
|---|---|
| Impact | Serious |
| Success criterion | 4.1.2 Name, Role, Value · A |
| Standards | WCAG 2.0 · WCAG 2.1 · WCAG 2.2 · Section 508 · EN 301 549 |
| Fixed with a text: from the page or written by AI |
Example
<div role="button" tabindex="0" class="icon-heart"></div>A screen reader says only “button”. The user cannot tell what it does.
<div role="button" tabindex="0" class="icon-heart" aria-label="Add to wishlist"></div>A screen reader says “Add to wishlist, button”.
Why it matters
Screen readers announce a command by its name and role. With no name, blind users hear “button” or “link” and must guess, often by activating it and waiting to see what happens. On a page with several unnamed icons, such as share, favourite and delete, that guess can have real consequences.
Voice control users are affected too. They activate controls by saying their name, for example “click Add to wishlist”. A command without a name cannot be targeted, so they fall back to slow grid or number overlays.
Custom controls built with ARIA roles get no automatic name from the browser except their text content. Icon-only controls drawn with CSS or background images therefore end up empty very often.
How to fix it
Give every command a name that describes the action or destination.
Visible text available. Put the text inside the element. This is the simplest and best option:
<span role="link" tabindex="0">Track my order</span>
Icon only. Add aria-label:
<div role="button" tabindex="0" aria-label="Share this recipe">
<svg aria-hidden="true">…</svg>
</div>
A label exists elsewhere. Reference it with aria-labelledby:
<li role="menuitem" aria-labelledby="export-pdf">
<span id="export-pdf">Export as PDF</span>
</li>
You control the markup. Replace the custom element with a real <button> or <a href>. Native elements bring focus, keyboard support and naming from their content for free:
<button type="button" aria-label="Share this recipe">
<svg aria-hidden="true">…</svg>
</button>
If a visible label exists, make sure the accessible name contains the same words, so voice control users can say what they see.
Checklist
- Give every ARIA button, link and menu item a name.
- Use aria-label on icon-only commands.
- Describe the action, not the icon (“Delete”, not “Bin”).
- Prefer native button and a elements over ARIA roles.
How the check works
The check finds elements with role="button", role="link" or role="menuitem" that are not native controls. It passes when the element has visible text content, a non-empty aria-label, an aria-labelledby pointing to text, or a title. Otherwise it fails. Whether the name is meaningful still needs a manual check.
Resources
- Understanding 4.1.2 Name, Role, Value W3C
- W3C ACT rule 97a4e1 W3C ACT
- Providing accessible names and descriptions ARIA Authoring Practices Guide
- Button pattern ARIA Authoring Practices Guide
- Menu and menubar pattern ARIA Authoring Practices Guide
Updated October 27, 2026