Skip to content

fix(keyboard): roving tabindex needs key handling; modifier key listeners count (0.15.4) - #23

Merged
DuncanFaulkner merged 2 commits into
mainfrom
fix/roving-needs-keys
Sep 28, 2026
Merged

DuncanFaulkner merged 2 commits into
mainfrom
fix/roving-needs-keys

Conversation

@DuncanFaulkner

Copy link
Copy Markdown
Contributor
  • ngbr/unreachable-control: a roving-tabindex item is skipped only when something handles keys (widget, anything inside it, a controller, or an ancestor up to the nearest component host). Otherwise: moderate, verify-by-hand finding. Production builds (no ng.getListeners) still skip.
  • Key listeners with modifiers ((keydown.enter) → keydown.enter) now count as key handling — click-without-key flagged the fix its own docs recommend.
  • The 0.15.3 mouse-shortcut skip applies only to unreachable elements, so it no longer hides click-without-key.
  • --from + --serve no longer also names --base.

Tests: 297 pass incl. real-Angular E2E (modifiers + half-built tab list), sabotage-checked. Docs dogfood (154 routes, dev build): identical findings to 0.15.3.

🤖 Generated with Claude Code

DuncanFaulkner and others added 2 commits September 28, 2026 09:02
…t skip only when unreachable (0.15.4)

unreachable-control skipped a tabindex=-1 composite item whenever Tab could
enter the widget, so a half-built tab list (no arrow-key handling) passed.
Now it's skipped only when the widget, an item, a controller or an ancestor
below <body> listens for keys; otherwise it's reported as moderate
(heuristic). Without window.ng, listeners can't be read, so it still skips.

The 0.15.3 mouse-shortcut skip ran before the reachability check and so also
suppressed click-without-key on reachable elements; it now applies only to
unreachable ones.

--from --serve no longer also names the defaulted --base.

Forms-pack docs dogfood (154 routes, dev build): identical findings to 0.15.3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… search at the component host

Angular's getListeners reports (keydown.enter) as keydown.enter, which wasn't
recognised as key handling, so click-without-key flagged the recommended
(click)+(keydown.enter)+(keydown.space) fix, and roving widgets using
(keydown.arrowRight) would be reported. Match on the base event.

The roving-tabindex key search now walks ancestors only up to the nearest
component host, so an app shell's shortcut listener doesn't vouch for every
widget; results are cached per widget per scan, checking cheap candidates
before the widget's contents.

Real-Angular E2E covers modifiers and the half-built tab list; sabotage-checked.
Docs dogfood (154 routes): identical to 0.15.3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@DuncanFaulkner
DuncanFaulkner merged commit 2ec69d5 into main Sep 28, 2026
1 check passed
@DuncanFaulkner
DuncanFaulkner deleted the fix/roving-needs-keys branch September 28, 2026 17:51
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.

1 participant