Accessiblity: Navigation issues using keyboard on <Menu/>
See original GitHub issueDescribe the bug
In <Menu/>
component while navigating with keyboard if <MenuItem/>
is or has Link inside it’s not navigating but onClick
event gets triggered perfectly and clicking using mouse also works fine.
below is the example taken from https://chakra-ui.com/menu#usage
<Menu>
<MenuButton as={Button} rightIcon="chevron-down">
Actions
</MenuButton>
<MenuList>
<MenuItem onClick={() => alert("Hello World!")}>Works</MenuItem>
<MenuItem as="a" href="https://www.foobars.in">Does Nothing</MenuItem>
</MenuList>
</Menu>
Expected Behavior Should navigate to href on pressing enter on <MenuItem/> component
To Reproduce
- Navigate to Second menu item
- Press enter on selected component
- Nothing happens instead of navigating
Suggested solution(s)
Desktop (please complete the following information):
- OS: [e.g. iOS]: Linux
- Browser [e.g. chrome, safari]: Chrome
- Version [e.g. 22]: 79.0.3945.79
Additional context NA
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Accessibility by Design Keyboard Navigation
Keyboard navigation uses the TAB, Arrow, ENTER, and space bar keys. The TAB key allows a user to jump from one interactive element...
Read more >Keyboard Accessibility - WebAIM
Keyboard accessibility is one of the most important aspects of web accessibility. Many users with motor disabilities rely on a keyboard.
Read more >Keyboard Compatibility | Web Accessibility Initiative (WAI) - W3C
Provide a way for users to jump between blocks of content and controls. Keyboard issues occur particularly in forms, menus, and applications with...
Read more >Menu Navigation Accessibility | JavaScript in Plain English
In our case, a keyboard compatible menu should allow navigating between the items and clicking on them, with both the keyboard and correct...
Read more >Accessibility of the navigation menu of web application
Keyboard Users: Ideally, submenu should not be open automatically when the user is navigating through the main menu items, instead of that, it ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @harshzalavadiya,
We’ve just resolved this issue in preparation for the next release.
Thanks for reporting it.
Hi @harshzalavadiya,
We’ll look into this for the next release.