Skip to content

This translation has not been editorially reviewed yet. The German version is authoritative. Deutsche Fassung →

Accessibility

Why must the visible label be contained in the stored name?

The visible label of a control element must be contained in its stored, machine-readable name, because voice control users say what they see: someone who says "Click Send" only reaches the button if its stored name contains the word "Send". If the invisible name differs, the voice command falls flat. WCAG criterion 2.5.3 "Label in Name" prevents exactly this kind of mismatch.

Visible text and stored name can diverge

Every control element carries, alongside its visible text, a machine-readable name that screen readers and voice control use. Normally, the two are identical. They diverge when developers deliberately override the name in the source code — often with good intentions, to give screen readers more context. An example: the button displays "Request a quote", but the stored name reads "Open contact form". A voice control user says "Click Request a quote" — and nothing happens, because as far as the software is concerned, no element with that name exists. The rule is simple: the stored name may add to the visible wording, but it must contain it, ideally at the very start.

How the audit service checks the label-in-name match

The measurement finds all links and buttons whose name has been overridden in the source code and compares the visible text with the stored name. If the visible wording is missing from the name entirely, the criterion counts as violated — the report names the element and both texts. The measurement handles borderline cases cautiously: if the first words of the label are contained in the name and only the remaining wording differs, the report notes a manual check case instead of a violation. Very short visible texts that function as a symbol — such as an "X" to close something — are exempt under the criterion and are not held against the site.

  • Ask your agency to list all overridden names in the source code and match them against the visible labels.
  • Put the visible wording at the start of the stored name; any additions follow after it.
  • Avoid overriding names where the visible text already says everything — no override is better than a mismatched one.
  • Spot-check with your phone's voice control: say the visible text of a button and check whether it responds.

FAQ

What is the accessible name of a control element?

The accessible name is the machine-readable name by which assistive technology knows an element: screen readers announce it, and voice control searches for elements by it. It's normally derived from the visible text, but can be overridden in the source code. In that case: the visible wording must remain contained in the overridden name, otherwise voice commands fall flat.

Why doesn't my button work with voice control?

The most common cause: the stored name differs from the visible text. Voice control looks for an element with the spoken wording — if the button reads "Send" but the source code holds the name "Submit form", it finds nothing. Have the overridden name corrected so that it contains the visible wording.

How does the audit service check this criterion automatically?

The measurement finds all links and buttons with an overridden name and compares the visible text with the stored name directly in the source code of the loaded page. If the visible wording is missing from the name, the report flags a violation together with both texts. Partial matches are noted as a manual check case; symbol labels such as an "X" remain exempt.

Deutsche Fassung dieser Seite