Yes. It adheres to the WAI-ARIA design pattern and WCAG 2.2 AA standards.
Yes. It comes with default styles that matches the other components' aesthetic.
Yes. It's animated by default, but you can disable it if you prefer. Animations respect prefers-reduced-motion preferences.
Multiple Items Can Be Open
Yes. It adheres to the WAI-ARIA design pattern and WCAG 2.2 AA standards.
Yes. It comes with default styles that matches the other components' aesthetic.
Yes. It's animated by default, but you can disable it if you prefer. Animations respect prefers-reduced-motion preferences.
<Accordion aria-labelledby="single-accordion-label"> <Accordion.Item itemId="item-1"> <Accordion.Header itemId="item-1">Is it accessible?</Accordion.Header> <Accordion.Body itemId="item-1"> <p>Yes. It adheres to the WAI-ARIA design pattern and WCAG 2.2 AA standards.</p> </Accordion.Body> </Accordion.Item> <Accordion.Item itemId="item-2"> <Accordion.Header itemId="item-2">Is it styled?</Accordion.Header> <Accordion.Body itemId="item-2"> <p>Yes. It comes with default styles that matches the other components' aesthetic.</p> </Accordion.Body> </Accordion.Item> <Accordion.Item itemId="item-3"> <Accordion.Header itemId="item-3">Is it animated?</Accordion.Header> <Accordion.Body itemId="item-3"> <p>Yes. It's animated by default, but you can disable it if you prefer.</p> </Accordion.Body> </Accordion.Item></Accordion><Accordion allowMultiple aria-labelledby="multi-accordion-label"> <Accordion.Item itemId="multi-item-1"> <Accordion.Header itemId="multi-item-1">Is it accessible?</Accordion.Header> <Accordion.Body itemId="multi-item-1"> <p>Yes. It adheres to the WAI-ARIA design pattern and WCAG 2.2 AA standards.</p> </Accordion.Body> </Accordion.Item> <Accordion.Item itemId="multi-item-2"> <Accordion.Header itemId="multi-item-2">Is it styled?</Accordion.Header> <Accordion.Body itemId="multi-item-2"> <p>Yes. It comes with default styles that matches the other components' aesthetic.</p> </Accordion.Body> </Accordion.Item></Accordion>
When a user navigates to an accordion header, the screen reader announces the button text, its expanded or collapsed state (via aria-expanded), and the number of items in the accordion group. When a section is expanded, the panel content is announced (the panel has role="region" with aria-labelledby linking back to the header). When collapsed, the panel content is hidden from the assistive technology tree (aria-hidden="true"). Users can navigate between headers using arrow keys, and the screen reader will announce each header as it receives focus.