Accessible Expand/Collapse Examples
Basic Expand/Collapse
This is additional content that can be shown or hidden by clicking the button above.
The expand/collapse widget uses aria-expanded to communicate the state of the button to assistive technologies.
FAQ Expand/Collapse
Accessible expand/collapse widgets must:
- Use a button element for the control
- Include
aria-expandedattribute that reflects the current state - Connect the button to controlled content using
aria-controls - Ensure the button has a visible and accessible label
- Provide clear visual indication of the expanded/collapsed state
- Be keyboard operable with clear focus indication
Settings Panel
Advanced configuration options allow you to customize the behavior of this component.
These settings are optional and the component will work with default values if not specified.
Remember to test all configuration changes thoroughly before deploying to production.