Skip to content

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

@smhigley

Description

@smhigley

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions