# ARIA Command Name

> Elements with ARIA command roles such as button, link, or menuitem must expose a non-empty accessible name.

Source: https://knowledge.evinced.com/web/web-validations/aria-command-name

Elements with ARIA command roles such as `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*”.

```html
<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.

```html
<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.

```html
<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.

```html
<div role="button" tabindex="0" aria-label=""></div>
```

## WCAG techniques

### Sufficient techniques

-   [ARIA16: Using aria-labelledby to provide a name for user interface controls](https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA16)
-   [ARIA14: Using aria-label to provide an accessible name where a visible label cannot be used](https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA14)

### Failure techniques

-   [F68: Failure of Success Criterion 4.1.2 due to a user interface control not having a programmatically determined name](https://www.w3.org/WAI/WCAG22/Techniques/failures/F68)

## ACT Rules

-   [Button has non-empty accessible name](https://www.w3.org/WAI/standards-guidelines/act/rules/97a4e1/)
-   [Link has non-empty accessible name](https://www.w3.org/WAI/standards-guidelines/act/rules/c487ae/)
-   [Menuitem has non-empty accessible name](https://www.w3.org/WAI/standards-guidelines/act/rules/m6b1q3/)

## 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](https://knowledge.evinced.com/a11y-essentials/practical-guides-for-using-screen-readers)

1.  Load the page, open a screen reader.
2.  Move to the control that you want to inspect.
3.  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

1.  Open the Accessibility Tree panel.
2.  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](https://www.w3.org/TR/WCAG22/#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](https://www.etsi.org/standards/etsi-301-549) | Same as the WCAG text. |
| 508 Trusted Tester | [2.4.4-link-purpose, 6.A](https://section508coordinators.github.io/TrustedTester/links.html#check-244-link-purpose) | 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. |

## Personas impacted by this issue

-   [Screen Reader](https://knowledge.evinced.com/a11y-essentials/personas#screen-reader)
-   [Braille](https://knowledge.evinced.com/a11y-essentials/personas#braille)
-   [Voice Input](https://knowledge.evinced.com/a11y-essentials/personas#voice-input)

## Related Issues

-   [link-name](https://knowledge.evinced.com/web/web-validations/link-name)
-   [summary-name](https://knowledge.evinced.com/web/web-validations/summary-name)
-   [button-name](https://knowledge.evinced.com/web/web-validations/button-name)
-   [aria-treeitem-name](https://knowledge.evinced.com/web/web-validations/aria-treeitem-name)
-   [aria-toggle-field-name](https://knowledge.evinced.com/web/web-validations/aria-toggle-field-name)
-   [accessible-name](https://knowledge.evinced.com/web/web-validations/accessible-name)
