Each widget is wrapped in a container with class "example". The controlled content containers use the class "details".
What this is: A simple expand/collapse region controlled by a button. The button uses aria-expanded to reflect the state and aria-controls to identify the content area.
Tip: Press the button (or Enter/Space when focused) to toggle. Press Escape while focus is inside to close.
More context
This example shows a slightly richer content area. The script performs a smooth slide animation using max-height and the content's scrollHeight to animate open/close transitions.