A button says “Send enquiry”, but its hidden name still says “Request consultation” from an earlier design. Together they create two versions of the same interface. Someone using voice control may speak the words on screen, while the software receives a different name. A reliable control should not require learning a secret vocabulary.
1. Compare the visible label with the actual name
WCAG’s Label in Name criterion requires the accessible name of a control with a text label, including an image of text, to contain that visible text. Putting the visible words first is a best practice rather than a separate strict requirement. Capitalization and most punctuation generally do not decide whether the wording matches.
Begin with a small inventory: primary buttons, navigation links, search, form fields and repeated card actions. Write down what a person sees, then inspect the name computed by the browser. Do not infer the result from an attribute alone. A visual review cannot reveal a stale hidden string, and a code search cannot always show how several naming sources combine.
2. Let visible words do the naming work
Prefer the existing visible text and native HTML relationships where they fit. A real button with clear text or a properly associated form label often avoids a second wording source. Our guide to fields with a clear purpose covers the editorial starting point: people need to understand what the control is for.
An aria-label can replace the name that would otherwise come from visible content. It is not an automatic accessibility upgrade. Before adding one, ask what problem it solves and whether it creates another phrase that must be translated and maintained. Remove redundant overrides only after checking the resulting name and behaviour.
3. Add context without replacing the familiar label
A row of identical action labels may need context. If the visible action is “View project”, a name such as “View project: garden pavilion” preserves the recognizable words while identifying the destination.
Keep long instructions separate from the short name. An accessible description can provide supporting information without turning every encounter with a button into a paragraph. The article on descriptive links explores another part of the same decision: improve visible wording when it can make the destination clearer for everyone, rather than relying exclusively on invisible additions.
4. Keep translations and states synchronized
Review a translated control as a pair: its visible words and its computed name. A localized label with an English override is still a mismatch. When an action changes from starting something to stopping it, check that all naming sources reflect the current function rather than yesterday’s state.
Icon-only controls have no visible text label to match under this particular criterion, but they still need an appropriate accessible name. Do not erase useful visible text just to avoid comparison. Decide whether an icon-only version is genuinely understandable on a small screen, and give it the same functional meaning as the larger version.
5. Test the words people will actually use
Inspect the accessibility tree, then try representative controls with relevant voice-control and screen-reader setups. Use the visible wording rather than a memorized implementation name. Different tools can behave differently; record the browser, software and language tested instead of claiming universal recognition.
- Does the computed name contain the visible label?
- Are extra words useful rather than distracting?
- Have hidden overrides survived a copy or translation change?
- Do changed states keep their labels and names aligned?
- Can people identify the action without hidden vocabulary?
A small naming audit protects a basic promise: the control people see is the control they can ask the interface to use.
