Skip to content
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

[Bug]: react-menu doesn't restore focus to the trigger when clicking a menu item #24680

Closed
smhigley opened this issue Sep 6, 2022 · 0 comments · Fixed by #24738 or #25289
Closed

[Bug]: react-menu doesn't restore focus to the trigger when clicking a menu item #24680

smhigley opened this issue Sep 6, 2022 · 0 comments · Fixed by #24738 or #25289

Comments

@smhigley
Copy link
Contributor

smhigley commented Sep 6, 2022

Currently the focus behavior is correct when any of the following occurs:

  • the keyboard is used to select an item
  • tab/shift tab away from an open menu
  • click outside an open menu

The only scenario where it's incorrect is when the user clicks on a menu item within an open menu -- focus isn't handled, so it returns to document.body.

This mostly affects screen reader users who use virtual cursor or touch to navigate, since those will trigger click events, as well as screen reader users who use a mouse to navigate, since returning focus to document.body will affect SR output when the menu closes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.