HTML aria-label ARIA Attribute
The aria-label attribute gives an element an accessible name as a text string, for elements that have no visible text label, such as an icon-only button.
Description
The aria-label attribute defines a text string that is used as the accessible name of an element: the name a screen reader announces when the user reaches it. It is meant for interactive elements and landmarks that have no visible text that could be used as their label, such as a button that only contains an icon, or a second <nav> on a page that needs a name to tell it apart from the first.
When an element has visible text that can act as its name, use that text instead, either as the element's content or with aria-labelledby pointing to it. Visible labels help everyone, including people who use voice control and say what they see on the screen. If both aria-labelledby and aria-label are present, aria-labelledby wins. For form fields, a <label> element is the best choice.
The attribute replaces any name the element would otherwise get from its content, so <button aria-label="Close">X</button> is announced as "Close", not "X". It is not supported on every role: elements with a role such as generic, paragraph or presentation must not be named, and on a plain <div> or <span> the label is usually ignored. Browser translation tools also often leave aria-label text untranslated.
Properties
- Type
- Global
- Value
- string
- Default
- None
- Used with
- All elements (global attribute)
Syntax
<element aria-label="text">
Values
- textA short, human-readable name for the element, such as "Close" or "Search". Don't include the role in the text: a screen reader already announces "button".
Example
Browser Support
The following information will show you the current browser support for the aria-label ARIA attribute. Hover over a browser icon to see the version that first introduced support for this ARIA attribute.
Desktop





Tablets & Mobile





