Skip to content

fix: only show focus outline when opening breadcrumbs overlay with keyboard#11876

Closed
web-padawan wants to merge 1 commit into
mainfrom
breadcrumbs-overlay-focus-visible
Closed

fix: only show focus outline when opening breadcrumbs overlay with keyboard#11876
web-padawan wants to merge 1 commit into
mainfrom
breadcrumbs-overlay-focus-visible

Conversation

@web-padawan

@web-padawan web-padawan commented Jun 2, 2026

Copy link
Copy Markdown
Member

Description

Updated to pass focusVisible so that the focus outline is only shown when opening from keyboard.
This aligns the behavior with other existing components and resolves a TODO from #11868.

@web-padawan web-padawan changed the title refactor: only show focus outline when opening overlay item with keyboard refactor: only show focus outline when opening breadcrumbs overlay with keyboard Jun 2, 2026
@web-padawan web-padawan changed the title refactor: only show focus outline when opening breadcrumbs overlay with keyboard fix: only show focus outline when opening breadcrumbs overlay with keyboard Jun 2, 2026
@web-padawan web-padawan force-pushed the breadcrumbs-overlay-focus-visible branch from 5aa825d to 722f314 Compare June 2, 2026 05:52
@web-padawan web-padawan requested review from jouni and vursen June 2, 2026 05:52
@sonarqubecloud

sonarqubecloud Bot commented Jun 2, 2026

Copy link
Copy Markdown

@jouni

jouni commented Jun 2, 2026

Copy link
Copy Markdown
Member

This is not a good fix, and might even be worse.

Ideally, the first item should not be focused when the overlay is opened with a pointer. The overlay itself should be focused. After this change, if you open the overlay with a pointer, and press arrow down, you’d expect the first item to get focused. But the second item receives the focus instead.

The behavior of our components is inconsistent, when opening the overlay with a pointer:

  • Context Menu: focuses the first item and shows the outline (how breadcrumbs works before this PR).
  • Select: focuses the first item but doesn't show the outline (how breadcrumbs would work after this PR).
  • Menu Bar: doesn't focus the first item (so no focus outline either) – this is the behavior we want.

@web-padawan

Copy link
Copy Markdown
Member Author

Menu Bar: doesn't focus the first item (so no focus outline either) – this is the behavior we want.

Thanks, I misunderstood the TODO comment. Will close this PR and implement a corresponding fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants