adobe / adobe/spectrum-web-components

[Bug]: Menu item focus state in overlay when using keyboard in Safari has visual issues

Open
#4,520 0 comments 0 reactions 0 assignees View on GitHub
Browser:Safari bug Component:Menu Component:Overlay Component:Picker SEV missing
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-item, sp-picker, sp-action-menu

### Expected behavior

When navigating menu items inside of an overlay with the keyboard, focus state should appear correctly as menu items are focused and unfocused.

Expected behavior shown in Chrome:

https://github.com/adobe/spectrum-web-components/assets/216355/3c5731af-da33-47c8-9f03-f1e3adef01e4

### Actual behavior

When navigating menu items inside of an overlay with the keyboard, menu items appear to be getting partially stuck in the focused state

Actual behavior in Safari:

https://github.com/adobe/spectrum-web-components/assets/216355/b036051c-4ecd-4868-bdef-5ea0d167d0c5

### Screenshots

_No response_

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

Safari

### How can we reproduce this issue?

1. Go to https://stackblitz.com/edit/vitejs-vite-fs3h7n?file=src%2Findex.css,src%2Fmy-element.ts&terminal=dev in Safari
2. Click overlay trigger button. Open one of the menus inside of the dialog and use up and down arrows to navigate the menu.

### Sample code that illustrates the problem

_No response_

### Logs taken while reproducing problem

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by opening the linked StackBlitz reproduction in Safari and follow the overlay, menu, and keyboard navigation steps. Investigate focus behavior for sp-menu-item, sp-picker, and sp-action-menu; done means focused and unfocused menu items render correctly while navigating with the keyboard, matching the expected Chrome behavior.

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
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.