A visitor using voice control sees a button marked “Track order” and says those words. If the browser exposes the button as “Shipment lookup,” the command may miss it. Matching the name to the words people see also helps users who read the screen while listening to a screen reader.
What does WCAG require?
Label in Name (2.5.3) is Level A in WCAG 2.1 and 2.2. When a control has a visible label made of text or an image of text, its accessible name must include that wording. The accessible name is what the browser provides to assistive technology to identify the control. Start the name with the visible wording when you add context. This placement is a recommendation. Including the wording is the requirement.
Differences in capitalization and most punctuation usually make no difference to this check. Pure icons and symbolic letters, such as “B” on a bold-formatting button, fall outside this visible-text matching requirement. Those controls still need appropriate names under other criteria.
Where mismatches happen
- A button says “Track order,” but an
aria-labelattribute overrides its built-in name with “Shipment lookup.” - A form field has a clear visible label. Its
aria-labelledbyattribute points to a different element, so the browser uses that other text as the name. - A graphic button visibly reads “Print ticket,” but the alternative text says “Printer.” The visible wording is missing from the name.
How to keep labels and names aligned
Let the text inside a native button or link supply its name. For a form field, associate its visible HTML label with the field. Review naming overrides in reusable components, especially after copy or translation changes.
<button type="button" aria-describedby="tracking-help">Track order</button>
<p id="tracking-help">Shows the carrier’s latest update below.</p>
Here, “Track order” remains the name. The extra sentence is an accessible description, which gives assistive technology context separately from the name. When a control needs extra words in its name, keep the full visible phrase together. For example, “Track order 308” preserves “Track order.”
How to test visible labels against names
Automated comparisons can flag some mismatches. For a manual check, use the browser’s accessibility panel to inspect the computed name, the name the browser actually exposes after applying its naming rules. Compare it with the wording on screen. Check translated versions and controls whose labels change after interaction. With speech input, try activating the control using its visible wording. Use the name comparison as evidence even if your voice tool offers numbered shortcuts.
Use SimplifyAccess Compliance Assessment to document the visible wording, computed name, and test result for affected controls.
Related accessibility requirements
The guide to accessible buttons, forms, and custom controls explains WCAG 4.1.2, which also addresses the names of controls that have no visible text.
