Expand / Collapse Widget — Accessible Examples

Each widget is wrapped with a container classed "example". The controlled content containers use the class "details". Use the buttons to expand or collapse content.

Press enter or space to expand
Press enter or space to collapse

Expanded example: This instance starts expanded to show the open state. You can collapse it using the same button.

Content here could be long form, additional controls, or any other information you want to reveal on demand.

The content container has the required class "details".