aria-labelledby attribute | ariaLabelledby property
Sets or retrieves a list of elements that provide a label for the current object.
![]() |
Syntax
| HTML |
|---|
<element aria-labelledby="p" ... > |
| JavaScript |
|---|
object.setAttribute("aria-labelledby",value);var value = object.getAttribute("aria-labelledby");
|
Property values
Type: String
A space-separated list of id property values.
Standards information
- Accessible Rich Internet Applications (WAI-ARIA) 1.0, Section 6.6
Remarks
| Used in Roles |
|
|---|
One or more id properties may be specified. A list of id properties is returned by Microsoft UI Automation.
In addition to providing the ariaLabelledby property, you should also use a label element to indicate a label for previous versions of the browser.
Note For cross-browser compatibility, always use the WAI-ARIA attribute syntax to access and modify ARIA properties, for example
object.setAttribute("aria-valuenow", newValue). If more than one id is specified, only the first id is recognized by Windows Internet Explorer 8.
Note Recursive use of ariaLabelledby is not supported. An element that is using ariaLabelledby should not reference another element that is also using ariaLabelledby.
See also
- Accessible Rich Internet Applications (ARIA)
- Reference
- aria-controls
- aria-flowto
- aria-describedby
- aria-owns
- aria-posinset
- aria-setsize
Show:
