Favorites

HTML aria-expanded ARIA Attribute

aria-expanded
ARIA AttributeThis ARIA attribute is supported by all modern browsers.
Updated 28th November 2026

The aria-expanded attribute tells assistive technology whether a control, such as a menu button or accordion header, has its related content expanded (true) or collapsed (false).

☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee

Description

The aria-expanded attribute is set on a control, such as a button, to say whether the content it shows and hides is currently expanded or collapsed. It is used for disclosure widgets, accordions, drop-down menus, combo boxes and tree items. Screen readers announce the state, for example "Menu, button, collapsed", so users know whether activating the control will open or close something.

The attribute goes on the element that the user activates, not on the content that appears. Update it with JavaScript every time the state changes. It is often combined with aria-controls, which points to the content being shown or hidden. When the attribute is left out, the element is not expandable at all, which is different from false.

Native HTML can handle this for you. A <details> element exposes its open state automatically, and a button with popovertarget reports the state of its popover, so no aria-expanded is needed in those cases.

Properties

Type
Widget
Value
true/false/undefined
Default
undefined
Used with
application, button, checkbox, combobox, gridcell, link, listbox, menuitem, row, rowheader, tab, treeitem

Syntax

<element aria-expanded="true | false">

Values

  • trueThe element it controls is expanded (shown).
  • falseThe element it controls is collapsed (hidden).
  • undefinedThe default when the attribute is left out: the element is not expandable.

Example

<button type="button" aria-expanded="false" aria-controls="faq1"
onclick="var o=this.getAttribute('aria-expanded')==='true';this.setAttribute('aria-expanded',!o);document.getElementById('faq1').hidden=o;">
What is ARIA?
</button>
<div id="faq1" hidden>
<p>ARIA adds roles, states and properties that help assistive technology.</p>
</div>

Browser Support

The following information will show you the current browser support for the aria-expanded ARIA attribute. Hover over a browser icon to see the version that first introduced support for this ARIA attribute.

This ARIA attribute is supported by all modern browsers.

Desktop

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported
☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee