-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Opening Modal from OverflowMenu, focus is not placed on the Modal's selectorPrimaryFocus #4036
Comments
WCAG 2.1 violation is with respects to Success Criterion 2.4.3 Focus Order |
Workaround: The overflow menu action opening modal with |
Hello @asudoh, I was unsuccessful at using
|
Seems that you hit #4088, too. Adding |
Hi @asudoh, See here for an example |
This change eliminates the need for application to put focus sentinel by having `<Modal>`, `<ComposedModal>` and `<FloatingMenu>` automatically put the focus sentinels. This change also add support for reverse-focus-wrap feature to `<Modal>` and `<ComposedModal>`, without needing using 3rd-party `focus-trap-react` library. This helps applications hitting adverse side-effects that `focus-trap-react` library causes (e.g. carbon-design-system#3021, carbon-design-system#3665 and carbon-design-system#4600). Fixes carbon-design-system#3817. Fixes carbon-design-system#4036. Fixes carbon-design-system#4600.
This change eliminates the need for application to put focus sentinel by having `<Modal>`, `<ComposedModal>` and `<FloatingMenu>` automatically put the focus sentinels. This change also add support for reverse-focus-wrap feature to `<Modal>` and `<ComposedModal>`, without needing using 3rd-party `focus-trap-react` library. This helps applications hitting adverse side-effects that `focus-trap-react` library causes (e.g. #3021, #3665 and #4600). Fixes #3817. Fixes #4036. Fixes #4600.
When using
<OverflowMenu>
with a<OverflowMenuItem>
that opens a<Modal selectorPrimaryFocus>
, the focus is not being placed on the<Modal>
but rather the<OverflowMenu>
that is in the background.Environment
macOS Mojave Version 10.14.6
N/A
Chrome Version 76.0.3809.132 (Official Build) (64-bit)
Job Access With Speech (JAWS), MacOS VoiceOver
Detailed description
The
<OverflowMenu>
items open a<Modal>
. When choosing a menu item, the focus should be placed on the modal, specifically the modal's close button. The close button should have focus by specifying<Modal selectorPrimaryFocus='.bx--modal-close'>
After the
<Modal>
is opened, the<OverflowMenu>
is stealing focus.I do not know the exact WCAG 2.1 violation. When using screen readers, it is misleading to visually impaired users what is on the screen. The screen reader announces the Overflow menu when the screen reader should be reading the opened modal.
Steps to reproduce the issue
...
button (i.e.<OverflowMenu>
)Additional information
Here is the problem below in my product recorded in a
.gif
file:NOTE: There is a workaround seen in the
gif
file. After opening the modal, the user can use the tab key to place focus on the modalx
close button. When you recreate the problem, the focus is now placed correctly on the modal close button.The text was updated successfully, but these errors were encountered: