Skip to content

Accessible names

Status: drafted, awaiting reviewIts rules are marked one by one.

An accessible name is the text that assistive technology reads out for a control. For most controls it comes from the visible label, so writing the label writes the name. Two cases need the writer’s attention: a control with no visible text, such as an icon button, whose name has to be written separately (in code it’s usually an aria-label), and a control whose written name differs from its visible label. People who use screen readers hear these names, and people who use voice control say them to operate the control, so they are interface text like any other and follow the rest of this guide. Image descriptions follow the style guide’s Images and alt text section.

Tier: neverux-icon-control-nameCheck: judgmentStatus: drafted, awaiting review

Give every icon-only control a name that says what it does. A button that shows only a pencil, a trash can, or three dots still needs words, for people who can’t see the icon and for people who don’t know what it means. Name the action, as a button label would: “Edit,” “Delete file,” “More actions.” Don’t name the picture (“Pencil,” “Trash can”) or the kind of control (“Button”), which the screen reader announces already. Show the same words in a tooltip, so a sighted person who doesn’t know the icon can find out. Role-dependent: icon-only controls, and a reader has to see the rendered control to know it has no visible text.

Instead of
A trash-can icon button named “Trash icon”
Write
A trash-can icon button named “Delete file,” with the same words in its tooltip

Tier: neverux-name-includes-labelCheck: judgmentStatus: drafted, awaiting review

Start a control’s accessible name with its visible label. When a control has visible text and a separately written name, the name begins with the visible words, so a person using voice control who says what they see operates the right control, and a person using a screen reader hears the same words a sighted colleague would use. Add any context after the label, not before it: a Download link in a list of invoices can be named “Download invoice INV-0001.” Role-dependent: controls with a written name, and a reader has to compare the name with what the control shows.

Instead of
A Download link named “Get the PDF for invoice INV-0001”
Write
A Download link named “Download invoice INV-0001”