-
Notifications
You must be signed in to change notification settings - Fork 137
Description
If a DropdownMenu contains a submenu, it currently opens on hover when the user moves the mouse over the item that triggers the submenu. However, the submenu is not accessible from the keyboard because it has no keyboard event handlers to open it.
As a result, this makes the submenu inaccessible for screen reader users — the submenu simply cannot be reached without a mouse.
I propose adding the necessary event handlers so that the submenu can also be opened via click (which works with Enter on the focused element and through standard screen reader interaction patterns).
Reproduction
https://stackblitz.com/edit/gravity-ui-uikit-example-jpx7ukl6?file=src%2FApp.tsx
Steps to reproduce
Focus the button that opens submenu using tab. Than try to open submenu from keyboard, using Enter, Space etc.
Expected: opened menu
Receiver: not opened menu :(
Environment
MacOS, yandex browser
Validations
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- The provided reproduction is a minimal reproducible example of the bug.