-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
DropdownMenu V2: Focus goes out when pressing Tab key #58040
Comments
I believe this behavior is intentional, and in line with the WAI-ARIA guidance on the Menu pattern. We should consider this a fix of the non-standard Tab behavior in Dropdown Menu v1. |
Thank you for giving me that information. After reading that guidance, I think the current behavior in v2 components also makes sense. If the v1 component needs to be fixed, should we leave this issue open? |
Agree with the sentiment around V2 behaviour feeling correct (cc'ing @diegohaz to confirm that the behaviour is indeed intentional)
We could technically leave this open, and close it when we merge the V2 implementation into the V1 (that's the goal for now). Or we could close this as a wontfix. I'm fine with either options. |
Correct me if I'm wrong, but I think the DropdownMenu V2 in WordPress uses the The reasoning behind this is that mouse users can already interact with elements outside the current window, whether it's the browser chrome or elements outside an iframe. So, this provides the same level of access to keyboard users. |
It is
Makes sense, thank you for the clear explanation! |
I'm going to close this issue as we established:
|
Description
The DropdownMenu V2 component allows you to use the arrow keys to move between menus in the same hierarchy without losing focus. However, if you press
Tab
orShift+Tab
, the focus will be lost from those menus.In Dropdown V1, the Tab key does not remove focus, so the behavior in V2 feels like a bug to me.
Step-by-step reproduction instructions
You can test this behavior on Storybook.
DropdownMenu V2
https://wordpress.github.io/gutenberg/?path=/story/components-experimental-dropdownmenu-v2--with-submenu
v2.mp4
DropdownMenu V1
https://wordpress.github.io/gutenberg/?path=/story/components-dropdownmenu--default
v1.mp4
Screenshots, screen recording, code snippet
No response
Environment info
No response
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
The text was updated successfully, but these errors were encountered: