This is the controlled content for Widget A. It expands and collapses with a smooth height transition.
- Uses
aria-expandedto reflect state - Uses
aria-controlsto link button to panel - Keyboard accessible (Tab + Enter/Space)
Each widget is wrapped in a div.example. The controlled content container uses the details class and is toggled via a button with aria-expanded and aria-controls.
This is the controlled content for Widget A. It expands and collapses with a smooth height transition.
aria-expanded to reflect statearia-controls to link button to panelWidget B demonstrates independent state per widget wrapper.
You can put any content here: text, lists, or additional controls.
Q: Can I have multiple widgets open?
A: Yes. Each .example controls only its own .details panel.