Example 1: Button toggles a controlled panel
Controlled content lives in this panel. It is associated with the toggle via aria-controls and aria-expanded.
- Keyboard: Tab to the button, press Enter/Space to toggle.
- Screen readers: The expanded state is announced.
- Focus: The toggle uses a high-contrast focus ring.
Example 2: Native <details> disclosure
More information (expand/collapse)
This uses native HTML disclosure behavior, which is accessible by default.
You can put any content here, such as links: