aria-controls attribute | ariaControls property
Sets or retrieves the list of elements that are controlled by the current element.
![]() |
Syntax
| HTML |
|---|
<element aria-controls="p" ... > |
| JavaScript |
|---|
object.setAttribute("aria-controls",value);var value = object.getAttribute("aria-controls");
|
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 |
|
|---|
This property defines element relationships and associations that cannot be readily determined from the document structure.
The
aria-controls property is used primarily by elements where the
role property value is group, region, or widget. Compare this usage with that of the
aria-owns property.
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). See also
- Accessible Rich Internet Applications (ARIA)
- Reference
- aria-describedby
- aria-flowto
- aria-labelledby
- aria-owns
- aria-posinset
- aria-setsize
Show:
