Skip to content

refactor: do not focus overlay item after opening breadcrumbs overlay#11885

Merged
web-padawan merged 2 commits into
mainfrom
fix/breadcrumbs-overlay-focus
Jun 8, 2026
Merged

refactor: do not focus overlay item after opening breadcrumbs overlay#11885
web-padawan merged 2 commits into
mainfrom
fix/breadcrumbs-overlay-focus

Conversation

@web-padawan

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

Copy link
Copy Markdown
Member

Alternative to #11876, addressing the approach suggested by Jouni in #11876 (comment): rather than masking the focus ring on the auto-focused first item, do not move focus at all when the overlay opens.

  • Focus stays on the overflow button when the overlay opens (click, Enter, Space).
  • First ArrowDown moves focus to the first non-disabled overlay item.
  • First ArrowUp moves focus to the last non-disabled overlay item.
  • Subsequent arrow / Home / End navigation inside the overlay is unchanged.
  • Disabled-skip is routed through KeyboardDirectionMixin._getAvailableIndex so the open-time handoff matches the per-keystroke contract.
  • Matches the <vaadin-menu-bar> precedent.

Related to #11876


🤖 Generated with Claude Code

@web-padawan web-padawan requested a review from jouni June 3, 2026 11:19
@web-padawan web-padawan changed the title refactor: defer breadcrumbs overlay focus until first arrow key refactor: do not focus overlay item after opening breadcrumbs overlay Jun 8, 2026
@web-padawan web-padawan force-pushed the fix/breadcrumbs-overlay-focus branch from 61f4e08 to 96d5e98 Compare June 8, 2026 07:45
Update the overflow overlay spec so focus stays on the overflow button
when the overlay opens; the first ArrowDown / ArrowUp keypress is what
moves focus into the overlay (ArrowDown to the first item, ArrowUp to
the last). Matches the <vaadin-menu-bar> precedent and avoids a focus
ring on pointer opens. The "skip disabled overlay items" Discussion
entry drops the now-stale reference to an open-time first-focus path,
and a new Discussion entry records the rationale for the change.
@web-padawan web-padawan force-pushed the fix/breadcrumbs-overlay-focus branch from 96d5e98 to 9834688 Compare June 8, 2026 13:52
@sonarqubecloud

sonarqubecloud Bot commented Jun 8, 2026

Copy link
Copy Markdown

@web-padawan web-padawan merged commit 3a474f6 into main Jun 8, 2026
10 checks passed
@web-padawan web-padawan deleted the fix/breadcrumbs-overlay-focus branch June 8, 2026 14:26
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