aria-command-name
Web validation
button, link, or menuitem must expose a non-empty accessible name.Every interactive command needs a text alternative so assistive technologies can identify and announce it. When a button, link, or menuitem is built with generic elements and ARIA roles, that alternative is provided through visible text or attributes like aria-label, aria-labelledby, or title.
Without a name, users of screen readers, voice control, or low-vision tools cannot determine the control’s purpose and may be unable to operate it.
Pass Patterns
ARIA-based button named by its text content
The <div> below is given the button role and contains visible text, so its accessible name is “Submit”.
<div role="button" tabindex="0">Submit</div>ARIA-based link named by an aria-labelledby attribute
This link role element uses aria-labelledby to reference text found elsewhere in the page.
<div id="product-link-text">Go to product page</div>
<div role="link" tabindex="0" aria-labelledby="product-link-text"></div>Fail Patterns
An ARIA-based button with only non-text content
The button’s only content is an image with an empty alt attribute, leaving the button without an accessible name.
<div role="button" tabindex="0">
<img src="/icons/heart.png" alt="" />
</div>An ARIA-based button with an empty aria-label attribute
The element declares an empty aria-label, so its accessible name is still missing.
<div role="button" tabindex="0" aria-label=""></div>WCAG techniques
Sufficient techniques
- ARIA16: Using aria-labelledby to provide a name for user interface controls
- ARIA14: Using aria-label to provide an accessible name where a visible label cannot be used
Failure techniques
ACT Rules
- Button has non-empty accessible name
- Link has non-empty accessible name
- Menuitem has non-empty accessible name
Try It Yourself
Using a screen reader
New to screen reader testing, or need a refresher?
Review this article first: Practical guides for using screen readers
- Load the page, open a screen reader.
- Move to the control that you want to inspect.
- Listen to what the screen reader announces.
Expected results: It speaks the control's name.
Actual results: It announces the control’s type like “button”, “link” or “menuitem”, but it does not announce its purpose.
Inspecting the browser dev-tools
- Open the Accessibility Tree panel.
- Select the control on the DOM tree.
Expected results: The Name field shows the text you provided.
Actual results: If unnamed, Name is empty.
FAQ
How does this issue relate to 4.1.2 Name, role, value?
SC 4.1.2 requires every user interface component to have a name that can be programmatically determined. A command element without an accessible name violates this requirement because assistive technologies cannot convey the control's purpose.
Why is this issue marked as Serious?
Without an accessible name, command elements are functionally invisible to screen readers and voice-control software. Users who rely on these technologies cannot activate the control, which blocks critical tasks and makes the interface unusable.
Standards and Regulations
| Standard | Success Criterion | Reference |
|---|---|---|
| WCAG 2.2 | 4.1.2 Name, Role, Value (A) | For all user interface components, the name and role can be programmatically determined; states, properties, and values that can be set by the user can be programmatically set; and notification of changes to these items is available to assistive technologies. |
| EN 301 549 | 9.4.1.2 Name, Role, Value | Same as the WCAG text. |
| 508 Trusted Tester | 2.4.4-link-purpose, 6.A | The purpose of each link or button can be determined from any combination of the link/button text, accessible name, accessible description, and/or programmatically determined link/button context. |