-
Notifications
You must be signed in to change notification settings - Fork 534
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 role="dialog"
, focus trap to Overlay
#4990
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 5627e4f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
size-limit report 📦
|
role="dialog", focus trap to
Overlay`role="dialog"
, focus trap to Overlay
👋 Hi from github/github! Your integration PR is ready: https://github.com/github/github/pull/343407 |
This change essentially turns Rollout plan:
|
@@ -109,6 +110,7 @@ type BaseOverlayProps = { | |||
portalContainerName?: string | |||
preventFocusOnOpen?: boolean | |||
role?: AriaRole | |||
focusTrap?: boolean |
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.
Added a new prop in case there's an implementation that wants to be a dialog, but doesn't want the focus trap applied. This is a very specific case, and ideally won't be necessary in more than a handful of instances.
Closes https://github.com/github/primer/issues/3378
Usages of
Overlay
tend to lean more towards a dialog across GH. This PR aims to define it as adialog
in most cases, provided with a focus trap that's toggled via the newly addedfocusTrap
prop.Changelog
New
role="dialog"
andaria-modal="true"
toOverlay
componentRollout strategy
Testing & Reviewing
Merge checklist