-
Notifications
You must be signed in to change notification settings - Fork 92
forward props for Accordion #970
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- also make it expandable via keyboard - move accordion and accordion story into its own folder
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
This comment was marked as outdated.
This comment was marked as outdated.
<button | ||
id="{id}-trigger" | ||
aria-expanded={open} | ||
aria-controls="{id}-content" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could use title
here instead, but there is the risk that it won't be unique. We might want to think about creating a generic util to generate a unique id for use cases such as this.
aria-controls="{id}-content" | |
aria-controls="{title}-content" |
Another approach could be to rework this to be a <li>
inside of a <ul>
and use the index + title for the id.
Ultimately, I think aria-expanded
is the most important addition here 😅
use uuid for default value add types for uuid and upgrade
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✨ 🪗 ✨
What was changed
Implement type-safe prop forwarding for
<Accordion />
Why?
Checklist
Closes
How was this tested: