ARIA labels: when to use them (and when not to)
ARIA labels give an element a name that screen readers announce. Here is when they help, when they hurt, and how to test them.
Quick answer
An ARIA label sets the accessible name of an element: the name a screen reader announces. Use
aria-labelwhen there is no visible text to use, such as an icon-only button. Usearia-labelledbywhen the name is already on the page. If a native HTML option exists, like a<label>for a form field, use that instead. WCAG doesn't require ARIA; it requires that every control has a name and role that software can read (Success Criterion 4.1.2).
What is an ARIA label?
An ARIA label is an attribute that tells assistive technology what an element is called. It comes from WAI-ARIA, the W3C specification for accessibility information in web pages. Three attributes do most of the work:
| Attribute | What it does | Example |
|---|---|---|
aria-label | Sets the name with a text string that isn't shown on screen | <button aria-label="Close">X</button> |
aria-labelledby | Uses the text of another element on the page as the name | A dialog named by its own heading |
aria-describedby | Adds a description after the name, such as a hint or an error | A password field pointing to its rules |
The name matters because it's how people who can't see the screen find and use a control. A button without a name is announced as just "button".
Does a screen reader read aria-label?
Yes. Screen readers announce the aria-label value as the element's name. What happens to the visible content depends on the element.
- On buttons and links,
aria-labelreplaces the text inside. W3C's naming guide says it "hides descendant content from assistive technology users and replaces it with the value of aria-label". - On most other elements, such as a
<nav>, the screen reader announces the label and then the content.<nav aria-label="Product">is announced as the "Product" navigation, followed by its links.
The label is invisible. Sighted users never see it, so a wrong or outdated label goes unnoticed unless someone tests with a screen reader. W3C also notes that aria-label values need translating when your site is translated.
Which label wins?
When an element has several possible names, browsers follow a fixed order. The W3C Accessible Name and Description Computation sets it. In simplified form:
aria-labelledbyaria-label- The native label:
<label>for form fields,altfor images,<caption>for tables - The element's own text content, for buttons, links and similar roles
- The
titleattribute, as a last resort
So aria-label overrides a visible <label>. If the two say different things, screen reader users hear something different from what everyone else sees.
When to use ARIA labels
Use them when an element has no visible text that could serve as its name. Typical cases:
- Icon-only buttons: a magnifying glass for search, an X to close, a hamburger menu.
<button aria-label="Search">gives them a name. - Several landmarks of the same type: two
<nav>elements become "Main" and "Footer" navigation witharia-label. - Custom widgets named by on-page text: a switch or dialog whose name is already visible nearby. Use
aria-labelledbyand point to that text, so there's one source to update. - Extra context for a field:
aria-describedbylinks a field to its format hint or error message.
When not to use ARIA labels
Don't use ARIA when native HTML already does the job. The first rule of ARIA, from W3C's Using ARIA, says: if a native HTML element or attribute has the semantics and behaviour you need, use it instead of adding ARIA. The common mistakes:
- Replacing a visible label. A form field with a visible
<label>doesn't needaria-label. W3C's naming guide says to prefer visible text: it's easier to maintain and helps people who don't use a screen reader. - A name that doesn't match the visible text. WCAG 2.2 Success Criterion 2.5.3 (Label in Name) requires the accessible name to contain the visible label. If a button says "Buy now" and its
aria-labelsays "Add to basket", voice control users saying "click Buy now" can't operate it. - Labelling elements that can't be named. WAI-ARIA 1.2 doesn't allow
aria-labelon some roles, includinggeneric(a plain<div>or<span>),paragraph,presentation,code,strongandemphasis. - Adding a role without the behaviour.
<div role="button">is, in W3C's words, "a promise". You also have to add keyboard focus and Enter and Space handling. A real<button>comes with all of that. - Hiding focusable elements. Don't put
aria-hidden="true"orrole="presentation"on something that can receive focus. Keyboard users land on it and hear nothing.
W3C's own advice sums it up: "No ARIA is better than bad ARIA."
Does WCAG require ARIA?
No. WCAG requires results, not a technique. Success Criterion 4.1.2 (Name, Role, Value) requires that for all user interface components "the name and role can be programmatically determined". Native HTML usually meets this on its own: a <button> with text, a <label> linked to its field, an image with alt.
ARIA is one way to meet it when native HTML can't, for example in custom widgets. Our complete guide to WCAG explains the success criteria and levels.
How to test your ARIA labels
Check the computed name, then listen to it.
- Browser developer tools. Inspect the element and open the Accessibility panel. It shows the computed name and role the browser passes to assistive technology.
- A screen reader. Tab through the page and listen. Is every control announced with a clear name and the right role?
- An automated scan. Our free accessibility checker flags controls with no accessible name. A scanner can tell that a name is missing, but not whether it makes sense, so the manual checks still matter.
For whole sites, accessibility monitoring catches new problems as your code changes, and an accessibility audit covers what scanners can't judge.
Accessible names are part of the accessibility tree, the structured view of a page that assistive technology reads. Our article on how AI models read your website covers why that structure matters beyond screen readers.
What this means for your team
- Start with native HTML. Use
<button>,<label>,altand<caption>before reaching for ARIA. - Give every icon-only control a name. That's where
aria-labelbelongs. - Keep names consistent with what's on screen. The accessible name should contain the visible label.
- Fix ARIA in shared components. One fix in a button or icon component repairs every page that uses it.
- Test with the accessibility panel and a screen reader before release, not only with an automated scan.
Frequently asked questions
What does aria-label mean?
It's an attribute that gives an element an accessible name, the text a screen reader announces. It isn't shown on screen.
Does a screen reader read aria-label?
Yes. Screen readers announce it as the element's name. On buttons and links it replaces the visible text; on landmarks like <nav> it's announced together with the content.
What is the difference between aria-label and aria-labelledby?
aria-label takes a text string you write in the code. aria-labelledby points to text that's already on the page. If both are present, aria-labelledby wins.
Is aria-label required for WCAG?
No. WCAG requires every control to have a name and role that software can read (Success Criterion 4.1.2). Native HTML usually provides that; ARIA is only needed when it can't.
Can I use aria-label on a div?
Not on a plain <div>. WAI-ARIA 1.2 prohibits naming the generic role, which a plain <div> has. Give the <div> a role that supports a name, or better, use the native element.
Should aria-label match the visible text?
The accessible name should contain the visible label, ideally at the start. That's WCAG Success Criterion 2.5.3, and it lets voice control users activate the control by saying what they see.
Related
- The complete guide to WCAG: principles, levels and success criteria
- Alt text: how to write it, with examples: naming images the right way
- Improve website accessibility in 5 steps: where to start fixing
- European Accessibility Act explained: why this matters for EU businesses
- Official sources: WAI-ARIA 1.2, Using ARIA, Accessible Name and Description Computation 1.2, WCAG 2.2



