Two examples of an accessible expand/collapse widget. Each widget is wrapped in a div.example and its controlled content uses a div.details.
Example 1: This content is revealed when the button is expanded. The widget uses aria-expanded on the button and aria-hidden on the controlled content. The content container has the class "details".
Tip: Press Space or Enter when the button is focused to toggle.