Open willmcvay opened 1 month ago
suggestion: I think it would be great to see us use the native HTML details element for the Accordion, particularly because it will provide all the correct a11y out-of-the-box for us, but also because it can handle groups of accordions at the DOM level, which provides CSS-only consumers a comparable experience to React users.
suggestion: I also think it would be great to move away from the items
prop and towards a more JSX-centric API. As a very rough draft, I mean something like...
<Accordion.Group>
<Accordion>
<Accordion.Header>Foo</Accordion.Header>
<Accordion.Body>Bar</Accordion.Body>
</Accordion>
...
</Accordion.Group>
note: a quick and dirty POC of the above two suggestions is available here
Abstract
As part of the v5 Elements release, each component will be reviewed and refactored to ensure best practice and design system alignment
Specification
AccordionGroup
and eachAccordionItem
it calls anAccordion
- we should align with this naming conventionDeveloper Checklist
Styles Only
andReact
component structuresRelease Checklist
Additional Context or Information