We'd like to set Google Analytics cookies to learn how people use the Knowledge Base, so we can improve it. We set them only if you accept.

Skip to main content
Digital Accessibility Knowledge Base

accessible-name

Web validation

User interface components that require an accessible name must expose a non-empty, programmatically determinable accessible name.

An accessible name is the text that assistive technology uses to identify a component's purpose. Buttons, links, form controls, and other interactive elements all need one, and this validation checks disabled controls too. The name comes from the computed accessible name. Common sources include aria-labelledby, aria-label, alt, title, a native label, button text, and visible text content. When an element has no accessible name, assistive technology may announce only a role, such as “button” or “edit text”. That leaves users without enough information to understand or operate the control.

Voice control software also relies on the accessible name: it's the phrase users say to activate a control. In the example below, the voice control software labels the named button "Submit", but can only mark the unnamed button with a question mark.

iOS Voice Control labels on two buttons. The button with visible text is labeled Submit, while the icon-only button with no accessible name is labeled with a question mark.

Pass Patterns

Button with visible text

The visible text gives the button a programmatically determinable accessible name.

HTML
<button type="button">Save changes</button>

Icon button named with aria-label

The aria-label names the icon-only button, since its visible content is hidden from assistive technology.

HTML
<button type="button" aria-label="Open settings">
    <svg aria-hidden="true" focusable="false"></svg>
</button>

Form field with an associated label

The <label> is linked to the input through for and id, so the field has an accessible name.

HTML
<label for="email">Email address</label>
<input id="email" type="email" />

Fail Patterns

Icon-only button with no name

The only content is an aria-hidden icon, so the button exposes no accessible name.

HTML
<button type="button">
    <svg aria-hidden="true" focusable="false"></svg>
</button>

The link contains only a hidden icon and no text, so it exposes no accessible name.

HTML
<a href="/settings">
    <svg aria-hidden="true" focusable="false"></svg>
</a>

Form field with no label

The text input has no associated <label>, aria-label, or aria-labelledby, so it has no accessible name.

HTML
<input type="text" />

WCAG techniques

Sufficient techniques

Failure techniques

ACT Rules

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

  1. Load the page and open a screen reader.
  2. Move to the target control.
  3. Listen to the name and role that are announced.

Expected results: The screen reader announces a clear name and role, such as “Save changes, button”.

Actual results: The screen reader announces only a role, an unclear symbol, or no useful name.

Two VoiceOver announcements. For a button with the text Submit, VoiceOver announces "Submit, button". For an icon-only button with no accessible name, it announces only "button".

Inspecting the browser dev-tools

  1. Inspect the target element in your browser's dev tools.
  2. Open the Accessibility panel.
  3. Check the computed Name value for the element.

Expected results: The computed Name value contains text that identifies the element's purpose.

Actual results: The computed Name value is empty or does not identify the element's purpose.

FAQ

How does this issue relate to 4.1.2 Name, role, value?

SC 4.1.2 requires user interface components to expose a name that can be programmatically determined. When a button, link, or form control has no accessible name, assistive technology cannot reliably identify its purpose.

Why is this issue marked as Critical?

Users may be unable to tell what an interactive element does before using it. A missing accessible name can block key tasks, especially when the element submits data, closes a dialog, or controls important page behavior.

Standards and Regulations

StandardSuccess CriterionReference
WCAG 2.24.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 5499.4.1.2 Name, Role, ValueSame as the WCAG text.
Section 5081194.21(d)Sufficient information about a user interface element including the identity, operation and state of the element shall be available to assistive technology. When an image represents a program element, the information conveyed by the image must also be available in text.
508 Trusted Tester2.4.4-link-purpose, 6.AThe 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.
508 Trusted Tester1.3.1-programmatic-label, 5.CThe combination of the accessible name, accessible description, and other programmatic associations (e.g., table column and/or row associations) describes each input field and includes all relevant instructions and cues (textual and graphical).

Personas impacted by this issue