ARIA States & Properties

aria-controls

Identifies elements whose content or presence is controlled by a widget. The relationship does not implement the action. Use valid IDs and synchronize the controlled region with the control state. Value type: ID reference list. Accepted values: space-separated IDs of controlled elements. Default or omitted behavior: none. Applicable context: global relationship; frequently disclosure, tabs, combobox. Use only where allowed for the element’s implicit or explicit role. ARIA describes accessibility semantics; it does not automatically implement the associated behavior. Test with the relevant browser and assistive technology.

Formal Syntax & Structure

html syntaxhtml
aria-controls="panel"

Parameters & Attributes

NameTypeDescription
aria-controlsID reference listAccepted values: space-separated IDs of controlled elements. Default or omitted behavior: none. Context: global relationship; frequently disclosure, tabs, combobox. Requiredness depends on the role.

Working Example

Example Snippethtml
<button aria-controls="panel" aria-expanded="false" onclick="const p=document.getElementById('panel');p.hidden=!p.hidden;this.setAttribute('aria-expanded',String(!p.hidden))">Details</button><div id="panel" hidden>Extra information</div>
HTML Reference