Skip to content

[menu-bar] Can't focus component after opening sub-menu #10250

@jouni

Description

@jouni

Description

When first rendered, a menu-bar can be focused with the tab key as expected. Once you open and close a sub-menu and move focus away from the menu-bar, you can no longer focus it with the keyboard.

Expected outcome

Component is always focusable with the tab key (unless it’s disabled).

Minimal reproducible example

Use the dev/menu-bar.html page to test:

Steps to reproduce

  • Open /dev/menu-bar.html
  • Press tab → View is focused
  • Press Enter → Sub-menu opens, Ruler is focused
  • Press Enter → Sub-menu closes, View is focused again
  • Press Tab → Focus moves to the browser chrome
  • Press Tab multiple times → Focus should move to the menu-bar, but instead keeps moving between the browser chrome and the web page.

Environment

Tested on Chrome, Firefox, and Safari on macOS.

Browsers

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions