Accessible Name Computer

Paste an interactive element and compute the name a screen reader will announce

Implements a practical subset of the W3C Accessible Name and Description Computation 1.2 (aria-labelledby, aria-label, native semantics, title fallback) for a pasted HTML element. See exactly what name assistive technology will announce, and why, without running a full screen reader. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

What is an accessible name?

The accessible name is the short label assistive technology announces for an element, such as 'Close dialog' for a button. It is computed by browsers using the W3C Accessible Name and Description Computation, and it is what a screen reader user actually hears.

Every interactive control needs a name that assistive technology can announce. If a button is just an icon with no label, a screen reader announces only “button” and the user has no idea what it does. This tool reproduces the browser’s own name-computation algorithm so you can verify the announced name from a pasted snippet, without firing up a full screen reader.

How it works

The tool parses your snippet with the browser’s built-in HTML parser, finds the first interactive element (or any element with a role), and walks the W3C Accessible Name and Description Computation in precedence order. The first step that yields a non-empty string wins.

  1. aria-labelledby — the text of each referenced element id is collected and joined in order. This overrides everything else.
  2. aria-label — if present and non-empty, its trimmed value is used.
  3. Native semantics — depends on the element:
    • Form fields (input, textarea, select) use an associated label (via wrapping or for), then placeholder, then a button value.
    • Images and image areas use the alt attribute.
    • Buttons, links, summaries and table cells use their own text content.
  4. title — used only as a weak fallback tooltip when nothing above produced a name.

If no rule produces text, the element has no accessible name, which is reported as an error because such a control is effectively unusable with a screen reader.

Example

Given this snippet:

<button aria-label="Close dialog" class="x">&times;</button>

The visible content is just a multiplication sign, but aria-label wins at step 2, so the computed accessible name is Close dialog. Remove the aria-label and the name falls back to the symbol character, which a screen reader would announce unhelpfully as “times” or nothing useful.

Notes and limitations

  • This implements a practical subset of the spec covering the common 95 percent of real elements. It does not resolve cross-document references, CSS generated content, or the full recursive traversal for complex nested labelling.
  • Always confirm critical interactions with a real screen reader (NVDA, JAWS, VoiceOver). This tool is a fast first check, not a replacement for testing with assistive technology.
  • All parsing happens in your browser. Nothing you paste is uploaded.