disclosure
A button that shows or hides a section of content, with aria-expanded on the button and aria-controls pointing at the section.
In more detail
Disclosures are the simplest show-and-hide pattern: Enter or Space toggles them and focus stays on the button. An accordion is a stack of disclosures; a FAQ page is a typical use.
Related terms
- accordion — A vertical stack of headings that each expand or collapse a panel of content.
- aria-expanded — An ARIA state on a button or trigger saying whether the content it controls is currently shown.
- aria-controls — An ARIA property on a trigger pointing, by id, to the element it shows, hides or changes.
Taught in
- Headless Architecture: State vs Presentation Separation — Design Systems & Component Engineering
- Floating Primitives: Popovers, Tooltips & Positioning — Design Systems & Component Engineering
- Navigation & Disclosure: Dropdown Menus, Tabs & Accordions — Design Systems & Component Engineering