adobe / adobe/spectrum-web-components

[Bug]: sp-menu: should skip hidden items when navigating via keyboard

Open
#6,307 2 comments 0 reactions 0 assignees View on GitHub
bug needs-jira-ticket triage
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)

sp-menu, sp-menu-item

### Library version

1.9.0

### Expected behavior

Hidden sp-menu-items would not participate in focus traversal of sp-menu items.

### Actual behavior

Hidden sp-menu-items are tab stops on focus traversal of sp-menu items.

### Screenshots

Image

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

Chrome

### How can we reproduce this issue?

1. Open https://opensource.adobe.com/spectrum-web-components/components/menu/#anatomy in Chrome
2. Inspect an sp-menu-item in Chrome Dev Tools
3. Add a hidden attribute
4. Use the up/down arrows to navigate the list
5. Note the tabstop on the hidden item

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

_No response_

### Severity

None

### Logs taken while reproducing problem

_No response_

### Would you like to track this issue in Jira?

- [x] Yes, please tell me the ticket number!

Contributor guide

Open the contributing guide

Research direction

Start with the sp-menu and sp-menu-item entry points and reproduce the issue in the menu anatomy example using Chrome. Trace keyboard focus traversal, then verify that items with the hidden attribute are skipped while visible menu items remain reachable with the up/down arrows.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.