Skip to content
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

Overlay: Add proper roles w/ keyboard expectations to stories #5175

Merged
merged 2 commits into from
Oct 28, 2024

Conversation

TylerJDev
Copy link
Contributor

We utilize Overlay in many different ways. Our stories for Overlay largely represent a modal dialog pattern. This PR aims to add proper roles with the proper keyboard expectations for those roles to each story.

Changelog

Changed

  • Adds roles with keyboard expectations to Overlay stories

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why (Only includes changes to Storybook examples)

Testing & Reviewing

Merge checklist

@TylerJDev TylerJDev requested a review from a team as a code owner October 25, 2024 18:14
Copy link

changeset-bot bot commented Oct 25, 2024

⚠️ No Changeset found

Latest commit: 016dd81

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@TylerJDev TylerJDev added the skip changeset This change does not need a changelog label Oct 25, 2024
@github-actions github-actions bot temporarily deployed to storybook-preview-5175 October 25, 2024 18:17 Inactive
Copy link
Contributor

github-actions bot commented Oct 25, 2024

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 97.23 KB (0%)
packages/react/dist/browser.umd.js 97.58 KB (0%)

Copy link
Member

@francinelucca francinelucca left a comment

Choose a reason for hiding this comment

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

Looking good!
One question: For the positioned overlays story, I have to hit esc twice to get one of the overlays to close, is this intended? In prod I see we only have to click it once.
I also noticed the default story is not showing up neither here nor in prod, do you know what that's about? I can open a separate issue for that
Everything else looks good to me!

@TylerJDev
Copy link
Contributor Author

One question: For the positioned overlays story, I have to hit esc twice to get one of the overlays to close, is this intended? In prod I see we only have to click it once.

Good catch, this seems to be because we're using an IconButton here with Tooltip. Escape will close the tooltip first before closing the dialog. I'm wondering if we should change this to a standard <button> with "close" as the text over an IconButton?

As for the default story, I believe it's because we only have a .features file for Overlay. I'm guessing this was a choice to only show features, but I'm not sure 🤔 We could create a separate issue for it and see if there are any other components w/o one.

@francinelucca
Copy link
Member

Good catch, this seems to be because we're using an IconButton here with Tooltip. Escape will close the tooltip first before closing the dialog. I'm wondering if we should change this to a standard <button> with "close" as the text over an IconButton?

Ahh I didn't notice the first esc was closing the tooltip, that may be ok then. Your call

Opened issue for default story: #5183

Copy link
Member

@francinelucca francinelucca left a comment

Choose a reason for hiding this comment

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

🚀

@TylerJDev TylerJDev added this pull request to the merge queue Oct 28, 2024
Merged via the queue into main with commit a2536bf Oct 28, 2024
43 checks passed
@TylerJDev TylerJDev deleted the tylerjdev/overlay-storybook-a11y-fixes branch October 28, 2024 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip changeset This change does not need a changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants