Expand/Collapse Controls

Expand/collapse controls allow sections of content to be dynamically revealed or hidden—commonly used in accordions, menus, or FAQ lists. For accessibility, these controls must clearly communicate their expanded or collapsed state to assistive technologies.

The ARIA attribute aria-expanded is used to indicate the toggle state of such elements. When the section is open, aria-expanded=”true” should be present; when closed, it should be set to “false”. This ensures that screen readers announce the state accurately (e.g., “Section heading, expanded”).

Keyboard accessibility is equally vital so that users must be able to open and close these sections using standard keys, such as Enter or Space. Visual indicators such as arrows or plus/minus icons should also be accompanied by text labels for clarity.

During audits, issues often include missing aria-expanded attributes, inaccessible toggle buttons built from <div> or <span> elements, or a lack of keyboard functionality.

Accessible expand/collapse controls provide users with the flexibility to manage content visibility while ensuring everyone receives clear, state-based feedback.