Accessible Expand/Collapse Widgets

1. Native HTML <details> Element

This is the most accessible method as it has built-in keyboard and screen reader support.

Click to reveal more information

The <details> element is the preferred semantic way to create an accordion or expand/collapse widget without needing custom JavaScript for basic functionality.

2. Custom ARIA Pattern

This version uses aria-expanded and aria-controls for custom implementations.