Two examples: a custom button controlling a region, and a native <details>.
Each widget is wrapped in a div.example, and the controlled content container uses the details class.
aria-controls and aria-expanded.
Press Enter or Space on the button to toggle.
hidden attribute when collapsed.<details>)div.details for consistent styling and structure.
open attribute automatically.