This is the most accessible method as it has built-in keyboard and screen reader support.
The <details> element is the preferred semantic way to create an accordion or expand/collapse widget without needing custom JavaScript for basic functionality.
This version uses aria-expanded and aria-controls for custom implementations.