adobe / adobe/spectrum-web-components

[Bug]: menu opened stops page keyboard shortcuts from working

Open
#4,786 0 comments 0 reactions 0 assignees View on GitHub
bug Component:Menu SEV 2 Status:WIP
Dominant language
TypeScript
Stars
1.5k
Forks
262
Avg merge
3d 10h
Merged PRs (30d)
68

Description

### Code of conduct

- [X] I agree to follow this project's code of conduct.

### Impacted component(s)

Menu

### Expected behavior

An opened sp-menu should allow application keyboard shortcuts.

### Actual behavior

An opened sp-menu **doesn't** allow application keyboard shortcuts, stopping the propagation of _almost_ all keydown events.

### Screenshots

_No response_

### What browsers are you seeing the problem in?

Safari, Chrome

### How can we reproduce this issue?

1. Go to [the menu storybook](https://opensource.adobe.com/spectrum-web-components/storybook/index.html?path=/story/menu-submenu--submenu)
2. Press "V" (a storybook keyboard shortcut), observe that nothing happens.
3. Close the menu
4. Press "V" again
5. See that the keyboard shorcut now works.

### Sample code or abstract reproduction which illustrates the problem

The problem seems to be related to the interaction between the menu and rovingTabIndex controller as per this PR: https://github.com/adobe/spectrum-web-components/pull/3780/files#r1661806320.

### Severity

SEV 2

### Logs taken while reproducing problem

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the menu Storybook example at the provided submenu URL and reproduce the failure by pressing "V" while the menu is open, then again after closing it. Read the interaction between the menu and the rovingTabIndex controller, including the discussion linked from PR #3780; done means application keydown shortcuts propagate while menu keyboard navigation still works.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.