Skip to content

fix(app): keep the timeline and Home list out of the Tab order - #65758

Merged
usrnk1 merged 3 commits into
devfrom
scroll-tab-stop
Nov 23, 2026
Merged

usrnk1 merged 3 commits into
devfrom
scroll-tab-stop

Conversation

@usrnk1

@usrnk1 usrnk1 commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Issue for this PR

Follow-up to the review comment on #65690. cc @Hona

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

The timeline and Home's session list became Tab stops whenever they could scroll, but since #65690 they draw no ring. Tab or Shift+Tab could land on the whole area, and focus seemed to disappear (WCAG 2.4.7).

The scroll area (ScrollView's viewport) is now never a Tab stop. Tab moves between the controls inside it, and those show their ring. A click still focuses the area, so click and then ↑/↓/PgUp/PgDn scrolls as before, and PgUp/PgDn in the composer still pages the timeline. ScrollView is only used by the timeline and Home, and both contain focusable controls, so I changed the shared component rather than adding a prop.

No feature flag: this is an accessibility fix.

How did you verify your code works?

  • New case in session-timeline-accessibility.spec.ts and an updated Home focus case in home.spec.ts. Both fail on dev (focus lands on the viewport) and pass here, 10/10 with --repeat-each=10 --workers=5 --retries=0.
  • e2e (built mode) for home, session-timeline-accessibility, session-panel-scrollbar and patch-sticky-header: 52 passed, 1 failed. The failure, Home keeps the session list in every interface mode, also fails locally on unchanged dev. Earlier runs of composer, timeline-cache and mobile-timeline-scroll passed apart from 9 tests that fail the same way on unchanged dev.
  • Component tests focus-rescue and input-surfaces: 15/15 on a cold story server.
  • bun typecheck in ui and app; scroll-view.test.ts 10/10; bun run lint:changed origin/dev: 0 problems.
  • CI: all checks passed.

Screenshots / recordings

Shift+Tab from the first control in the timeline

Before: focus lands on the timeline itself, with nothing visible

After: focus moves to Toggle review, with its ring

Shift+Tab from Add project on a short Home window

Before: focus lands on the list itself, with nothing visible

After: focus moves to New session, with its ring

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend approving this. On the base, Shift+Tab can land on the timeline or Home list itself, which draws no ring. With this PR, focus moves to the controls inside instead.

I checked with the e2e tests. Your new timeline test and the updated Home focus test pass on this branch. With only scroll-view.tsx put back to the base version, both fail on the viewport tabindex (0 instead of -1). The wider timeline, Home and scrollbar specs also pass. The only exception was a timeline-geometry visual-probe test, which failed once, passed on the base and then passed 3 times out of 3 here, so it looks flaky. tsc passes in ui and app.

ScrollView is only used by the timeline and Home, and both contain focusable controls, so keyboard users can still get into each list. A click still focuses the area, so keyboard scrolling after a click works as before.

Public API: unchanged.

I have no concerns.

@usrnk1
usrnk1 merged commit 7cfd868 into dev Nov 23, 2026
12 checks passed
@usrnk1
usrnk1 deleted the scroll-tab-stop branch November 23, 2026 10:14

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend approving this. The new commits only trim comments and merge dev, so the fix is the same as before. Your new timeline test and the updated Home focus test still pass on this head.

Public API: unchanged.

My last review raised no concerns, and I have nothing new.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant