Glossary · Code

Accessible name

Definition: An accessible name is the label an element carries in the accessibility tree – "Basket" for a basket button, for example. Screen readers announce it and voice control responds to it. The browser computes it by fixed rules from the element's text content, label, alt or ARIA attributes [1][2].

German: Zugänglicher Name · Also: accname · Last reviewed: 27 September 2026

Where the name comes from

The browser checks the possible sources in a fixed order and uses the first one that yields something [1][2]:

  1. aria-labelledby – the text of another element it points to,
  2. aria-label – text written directly in the attribute,
  3. the native label – <label> for form fields, alt for images, <legend> for fieldsets, <caption> for tables,
  4. text content – for links, buttons and headings, including any alt text inside them,
  5. as a last resort, title, or placeholder for input fields.

One consequence: aria-label overrides the visible text, which is rarely what you want [5].

Who relies on it

A screen reader announces the name and role of every control: "Basket, button". Without a name, all you hear is "button", and you have to guess. That is why WCAG 4.1.2 Name, Role, Value requires a name for every user interface component [3].

Voice control works with the name too. Saying "click Send" only works if "Send" is part of the accessible name. WCAG 2.5.3 Label in Name therefore requires the visible label to be contained in the name [4].

In code

<!-- No name: announced as just "button" -->
<button>
  <svg aria-hidden="true">…</svg>
</button>
<!-- A name for the icon button -->
<button aria-label="Open menu">
  <svg aria-hidden="true">…</svg>
</button>
<!-- Better still: visible text -->
<button>Search</button>

Common mistakes

  • Icon-only buttons and links, such as search, menu, close or social media icons.
  • An aria-label that differs from the visible text: the button says "Send", the name says "Submit form". Voice control users cannot hit it.
  • A placeholder as the only label. The placeholder disappears as you type and is only a last-resort source of the name.
  • "Read more" ten times. Each link has a name, but in the screen reader's list of links they are indistinguishable.
  • aria-label on a <div> with no role. The attribute is not meant for it there, and many screen readers ignore it.

How Reviseberg handles it

The axe-core rules button-name, link-name, label, select-name, input-button-name, aria-input-field-name and image-alt find controls, fields and images with no accessible name. Whether an existing name is any good – "Button 1" is a name too – is something no rule can decide. The keyboard agent's trail records the role and name of the focused element at every step, so a person can quickly see where names are missing or meaningless. Whether the visible label really is contained in the name is best checked by hand as well.

Accessibility tree · ARIA · Alt text · Form label · Voice control

Further reading

Frequently asked questions

How do I find out an element's accessible name?

The developer tools in Chrome and Firefox show the computed name of any element in their Accessibility panel.

Should I use aria-label or visible text?

Visible text wherever possible. It helps everyone, is translated reliably and matches voice control automatically. aria-label is for cases with no visible text, such as icon buttons.

Is the accessible name the same as alt text?

For an image, the alt text becomes its name. But the term is broader: links, buttons, fields and dialogs all have an accessible name.

Sources

  1. W3C, Accessible Name and Description Computation 1.2 – https://www.w3.org/TR/accname-1.2/
  2. W3C, HTML Accessibility API Mappings 1.0 – https://www.w3.org/TR/html-aam-1.0/
  3. W3C, WCAG 2.2, Success Criterion 4.1.2 Name, Role, Value – https://www.w3.org/TR/WCAG22/#name-role-value
  4. W3C, Understanding SC 2.5.3 Label in Name – https://www.w3.org/WAI/WCAG22/Understanding/label-in-name
  5. W3C WAI, ARIA Authoring Practices Guide, Providing Accessible Names and Descriptions – https://www.w3.org/WAI/ARIA/apg/practices/names-and-descriptions/

See what a scan finds on your site

One page in about thirty seconds, no email needed. The full report covers up to 100 pages and a keyboard journey.