Accessibility
Accordion expanded state
Represent exclusive expansion as one stable ID or null, expose current expansion and link each button to its panel.
Formal Syntax & Structure
react syntaxreact
aria-expanded={expanded} aria-controls={panelId}Working Example
Example Snippetreact
<button type="button" aria-expanded={expanded} aria-controls={panelId}>Details</button>