Skip to content

fix(chat): move focus into the focus picker and back, and announce the task strip's progress - #1942

Merged
gkhngyk merged 7 commits into
ansvisor:mainfrom
cihan-gyk:fix/chat-a11y-focus-and-strip
Nov 1, 2026
Merged

gkhngyk merged 7 commits into
ansvisor:mainfrom
cihan-gyk:fix/chat-a11y-focus-and-strip

Conversation

@cihan-gyk

Copy link
Copy Markdown
Collaborator

Summary

Two accessibility follow-ups, from the #1914 and #1900 reviews. Both are merged; this branch has current main merged in.

  1. Focus picker (focus-picker.tsx, feat(chat): ask once what Chat should focus on, starting from the person's work areas (W2-22) #1914):
    • When the picker opens, keyboard focus moves to its title, "What should Chat focus on for you?", from Home's pill or on first open. A screen reader reads the question, and Tab reaches the first card.
    • Opened from the pill, Cancel or Continue returns focus to the pill's Edit / Choose focus button.
    • On first open, Skip for now (and Continue) sends focus to Home's composer, or to the pill when the composer can't be typed in.
  2. Task strip (run/task-strip.tsx, feat(chat): work through this week's Action Center tasks with /tasks, in a task strip under the answer (W2-11) #1900):
    • A hidden aria-live="polite" region announces only the rows that changed, and the ready count once, e.g. "Fix wrong platform claim on /pricing: Ready for review. 3 of 4 ready".
    • Nothing is announced on reload or when the first tasks arrive.
    • The progress bar gets aria-valuetext ("2 of 4 ready"), matching the visible pill.
    • en.json gets chatRun.tasks.changed ("{title}: {status}").

No migration. No Help change: nothing visible changes, only keyboard focus and screen-reader output.

Left out: if saving fails in the pill's picker, the Continue button is disabled while saving, so focus may fall to body. This was there before.

Related issue

None. Follow-ups to the #1914 and #1900 reviews.

Type of change

  • feat — New feature
  • fix — Bug fix
  • chore — Maintenance / dependencies
  • docs — Documentation only
  • refactor — Code change that neither fixes a bug nor adds a feature
  • test — Adding or updating tests

How to test

  1. On Chat Home, Tab to the pill's Edit and press Enter.
    • Focus is on the picker's title (no ring there by design), and one more Tab rings the first card.
    • Tab to Cancel and press Enter: the ring is back on Edit. The same holds for Continue.
  2. On first open (focus and focus_prompted_at empty), Skip for now puts the caret in the composer.
  3. Run /tasks with VoiceOver on.
    • Row changes are announced briefly.
    • The bar reads "2 of 4 ready".
  4. Unit tests:
    • 4 focus tests;
    • aria-valuetext and 2 live-region tests;
    • the new tests fail on the old code.

Checklist

  • Branch follows the naming convention
  • Commits follow Conventional Commits
  • yarn lint passes (0 errors; 7 old warnings in files this PR doesn't touch)
  • yarn typecheck passes
  • yarn format:check passes
  • Changes are focused — one concern per PR
  • Help article updated under help/ (or no user-visible change)

Full checks on the branch before main was merged in (1e9f963): web 805 files / 8,406 tests pass, and yarn build passes. Server format:check and lint are clean, and 352 files / 4,994 tests pass (3 skipped). After merging current main (330ca4d; focus-picker.tsx and its test on main equal #1914's approved head, so this branch's versions were kept): format:check and typecheck pass, and the Chat components and help tests pass (34 files / 398 tests).

🤖 Generated with Claude Code

cihan-gyk and others added 7 commits October 31, 2026 23:20
…son's work areas (W2-22)

CHAT-24 §3: the focus picker opens once on the first Chat Home (marked
shown as it opens) with the areas the person's work areas suggest, Home's
pill reopens it, and Settings › General › Your focus keeps changes at
once. Focus only changes suggestions; no migration (00400 focus, 00408
focus_prompted_at).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Main hid Answer language, notifications and "Thought for N s" in Chat
Settings (ansvisor#1903). Keep them hidden and keep the new Your focus row, in
the component, the page comment and the help article.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… own settings

saveChatFocus, skipChatFocus and markFocusPrompted write only the person's
own chat_user_prefs row and cost nothing, like saveChatGeneralSettings, so
they join the read-only coverage test's open list with their reasons.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… pill is cancelled

From the pill the picker's way out still saved an empty focus, so changing
your mind wiped the focus you had. Opened from the pill it now reads
Cancel and only closes; Skip for now stays the first opening's answer.
…e task strip's progress

Follow-ups from the ansvisor#1914 and ansvisor#1900 reviews, for keyboard and
screen-reader users.

Focus picker (stacked on ansvisor#1914):
- Its question takes focus as it opens, from Home's pill or on the
  first Chat Home, instead of focus staying on body.
- Cancel or Continue from the pill hands focus back to the pill; Skip
  for now or Continue on the first opening lands on Home's composer
  (on the pill when the composer can't be typed in).

Task strip (/tasks, W2-11):
- A polite live region says what changed, once: the rows whose status
  moved ("Add FAQPage schema: Writing"), then "3 of 4 ready" when the
  count moved. A reload or the strip's first tasks say nothing.
- The progress bar has aria-valuetext ("2 of 4 ready").
- New text in en.json (chatRun.tasks.changed).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…-and-strip

# Conflicts:
#	web/src/components/chat/focus-picker.test.tsx
#	web/src/components/chat/focus-picker.tsx

@gkhngyk gkhngyk 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.

LGTM

@gkhngyk gkhngyk 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.

LGTM

@gkhngyk
gkhngyk merged commit 482e928 into ansvisor:main Nov 1, 2026
6 checks passed
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