aria-expanded
An ARIA state on a button or trigger saying whether the content it controls is currently shown.
In more detail
Disclosure triggers, accordion headers, menu buttons and popover triggers set it to true or false as they open and close. It goes on the trigger, not on the panel.
Related terms
- aria-controls — An ARIA property on a trigger pointing, by id, to the element it shows, hides or changes.
- disclosure — A button that shows or hides a section of content, with aria-expanded on the button and aria-controls pointing at the section.
- accordion — A vertical stack of headings that each expand or collapse a panel of content.
Taught in
- Headless Architecture: State vs Presentation Separation — Design Systems & Component Engineering
- Compound Component Patterns: Context Sharing & Internal State — Design Systems & Component Engineering
- Floating Primitives: Popovers, Tooltips & Positioning — Design Systems & Component Engineering
- Navigation & Disclosure: Dropdown Menus, Tabs & Accordions — Design Systems & Component Engineering