Glossary / Accessible names

Accessible names

An accessible name is the short label exposed to assistive technologies to identify an element’s purpose. It is computed from sources such as associated <label> text, element contents, aria-labelledby, aria-label, and—in limited cases—attributes such as alt. The name is not necessarily visible in the same form, but should normally match or include the visible label so speech-input users can invoke controls by what they see.

What to know

Debugging

Inspect the computed accessible name in browser developer tools rather than guessing from markup. Check precedence and hidden referenced text, ensure IDs are unique, and verify that CSS-hidden text intended for screen readers is hidden visually without display:none or visibility:hidden. Test icon buttons, repeated “More” links, form fields, and custom components. Keep names action-oriented and concise; do not repeat the role (“Submit button”) unless it adds meaning because assistive technology already announces role.

Interview questions

  1. Name versus description? Name identifies the control; description supplies additional context.
  2. When use aria-labelledby over aria-label? When suitable visible text already exists and can be referenced; this avoids duplicate strings and aligns visual and spoken labels.
  3. How should an icon-only button be labeled? Give the button a concise action name, such as “Close dialog”; do not rely on the icon glyph or tooltip alone.
  4. What is Label in Name? Visible label text should be included in the programmatic name so speech users can address the control.
  5. How do you find the actual name? Inspect the accessibility tree or browser accessibility pane and test with assistive technology.

References