Resonance Logo

Disclosure

A disclosure widget lets users toggle the visibility of additional content, with a trigger button that communicates its expanded or collapsed state to assistive technology.

Demo

Activate the disclosure trigger button below using a mouse click or by pressing Enter or Space while it has keyboard focus. Watch how the hidden content region appears and disappears. Pay attention to how the button label or icon changes to reflect the current state, and verify that a screen reader would announce the change.

What to Observe

Anatomy

[Anatomy image placeholder — will be added when assets are available]

  1. Trigger button — A <button> element that controls the disclosure; carries aria-expanded to reflect the current state and aria-controls to point to the content panel.
  2. State indicator — A visual cue (such as a chevron icon) that rotates or changes to signal whether the content is expanded or collapsed.
  3. Content panel — The collapsible region linked to the trigger; hidden or shown in a way that keeps it in sync with the accessibility tree.
  4. Panel content — Any text, links, or other elements inside the panel that become available only when the disclosure is open.

Accessibility Behavior

Common Mistakes

Why This Matters

Disclosure widgets are the foundation for FAQs, accordion sections, "read more" patterns, and sidebar navigation groups. When built incorrectly — especially when a non-button element is used as the trigger or aria-expanded is missing — screen reader users cannot tell whether content is available, and keyboard-only users may be completely unable to open the section. A pattern as fundamental as show/hide should be one of the most reliable in any component library.

Accessibility Validation

This component is validated against internal accessibility criteria aligned with WCAG standards, using our internally developed system, Resonance Specs.

To learn more, please contact us.

Code

Reference Implementation