-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
[Focus] Accessibility (a11y)Changes that impact accessibility and need corresponding review (e.g. markup changes).Changes that impact accessibility and need corresponding review (e.g. markup changes).[Package] Components/packages/components/packages/components[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
When a modal is dismissed, focus is expected to return to the element that opened the modal. This fails when dismissing a modal by clicking outside it.
Step-by-step reproduction instructions
- Start in the Post Editor
- Open the Options menu
- Open the Preferences modal
- Click outside the Preferences modal to dismiss it
- Observe the Options menu is still open and clicking or focus other elements does not cause it to close.
Screenshots, screen recording, code snippet
Here are a couple instances of the issue but there are more uses of Modal
that are probably affected.
Preferences modal
Google.Chrome.-.Edit.Post.My.WordPress.Website.WordPress.2023-06-20.at.8.46.52.PM.mp4
Post visibility confimation dialog
This is a ConfirmDialog
which is built on top of Modal
. I would expect the visibility dropdown menu would stay open and the focus return to the 'private' radio.
Google.Chrome.-.Edit.Post.My.WordPress.Website.WordPress.2023-06-20.at.8.40.39.PM.mp4
Environment info
- Gutenberg trunk running on wp-now
- Chrome
- macOS
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
Metadata
Metadata
Assignees
Labels
[Focus] Accessibility (a11y)Changes that impact accessibility and need corresponding review (e.g. markup changes).Changes that impact accessibility and need corresponding review (e.g. markup changes).[Package] Components/packages/components/packages/components[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended