HTML aria-labelledby ARIA Attribute
The aria-labelledby attribute gives an element its accessible name by pointing to other elements on the page whose text should be used as the label.
Description
The aria-labelledby attribute identifies the element or elements whose text becomes the accessible name of the current element. The value is a list of id values separated by spaces, and their text is joined in that order. It is the first choice when a visible label already exists on the page, for example a heading that names a dialog or a region.
It takes priority over every other way of naming an element, including aria-label, a <label> element and the element's own content. The referenced elements can be hidden and still provide their text, and an element can even refer to itself to combine its own text with another element's, such as "Read more" plus an article title.
For form fields, a <label> element is simpler and also makes the label clickable. Like aria-label, the attribute isn't allowed on roles that can't be named, such as generic or paragraph.
Properties
- Type
- Relationship
- Value
- ID reference list
- Default
- None
- Used with
- All elements (global attribute)
Syntax
<element aria-labelledby="id1 id2">
Values
- ID reference listOne or more
idvalues of the elements that label this one.
Example
Browser Support
The following information will show you the current browser support for the aria-labelledby ARIA attribute. Hover over a browser icon to see the version that first introduced support for this ARIA attribute.
Desktop





Tablets & Mobile





