Skip to main content

Expand/Collapse Widget Examples

Demonstrating accessible expand/collapse patterns using aria-expanded and proper focus management.

Basic Expand/Collapse

FAQ Example

Additional Information

Pre-Expanded Content

This expand/collapse widget demonstrates content that is visible by default. The button has aria-expanded="true" set initially, and the content does not have the hidden attribute.

Starting with expanded content can be useful when:

  • The information is critical and should be immediately visible
  • User research shows most visitors need this content
  • You want to draw attention to important updates or announcements

Users can still collapse this section if they wish to hide the content.