10000 forward props for Accordion by rossedfort · Pull Request #970 · temporalio/ui · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 8 commits into from
Dec 8, 2022
Merged

forward props for Accordion #970

merged 8 commits into from
Dec 8, 2022

Conversation

rossedfort
Copy link
Contributor
@rossedfort rossedfort commented Dec 2, 2022

What was changed

Implement type-safe prop forwarding for <Accordion />

  • also make Accordions expandable via keyboard

Why?

Checklist

  1. Closes

  2. How was this tested:

  1. Any docs updates needed?

- also make it expandable via keyboard
- move accordion and accordion story into its own folder
@vercel
Copy link
vercel bot commented Dec 2, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
holocene ✅ Ready (Inspect) Visit Preview Dec 7, 2022 at 8:30PM (UTC)
ui ✅ Ready (Inspect) Visit Preview Dec 7, 2022 at 8:30PM (UTC)

@cypress
Copy link
cypress bot commented Dec 2, 2022



Test summary

90 0 0 0


Run details

Project Temporal UI
Status Passed
Commit 29ac453d8b ℹ️
Started Dec 7, 2022 8:31 PM
Ended Dec 7, 2022 8:35 PM
Duration 04:35 💡
OS Linux Ubuntu - 22.04
Browser Chrome 107

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

< 10000 /div>

@rossedfort

This comment was marked as outdated.

<button
id="{id}-trigger"
aria-expanded={open}
aria-controls="{id}-content"
Copy link
Contributor

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.

Suggested change
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 😅

Copy link
Contributor
@laurakwhit laurakwhit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✨ 🪗 ✨

@rossedfort rossedfort merged commit 38c31c0 into main Dec 8, 2022
@rossedfort rossedfort deleted the accordion-prop-forwarding branch December 8, 2022 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0