Repository navigation
fix(a11y): expose on state of the find bar case-sensitive toggles - #31927
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks. Adding [DESIGN-REVIEWED] 643fe46 Description read[DESCRIPTION-READ] 449e00e14e14ca5a01c308908fb8354bfba8b84de3c693c880cfb09b1bc167bc That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing to check: the only change is [UX-REVIEWED] 643fe46 Description read[DESCRIPTION-READ] aa3b1626382508dfabf91c6ad81336cdc35308718e877e003b6dfc83c3cad085 That sha256 names everything this verdict read: the PR description, plus the 3 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing to check. What this change shipsInventory (2 items) — 2 justifiedIntent: let a screen-reader user hear whether case matching is on in the chat and document find bars. This is a FIX (#31923).
[FIRST-PRINCIPLES-REVIEWED] 643fe46 Description read[DESCRIPTION-READ] 0ac5baf929c888a14652360b14838f5c57743211abaaca951ea121e26fe6b202 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
The chat and document find bars each have a Case sensitive button that shows its state only by color, so a screen reader cannot tell whether case-matching is on. Both now carry aria-pressed.
db3567e to
643fe46
Compare
|
Fixed in 643fe46. Frontend Ratchets & i18n was right: the new test pushed |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Tier 1 auto-approve: fix (4 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, security checklist all-NO, no reviewer-lane findings, readiness signal fresh for this head SHA, declared category matches the diff. Category: the two case-sensitive toggles gain aria-pressed from their state, with tests.
Problem / Motivation
Goal: A screen-reader user can tell whether case-matching is on in the chat and document find bars.
The chat find bar and the document find bar each have a Case sensitive button. Its on state shows only as an accent color; the label never changes and the button carries no
aria-pressed.Why it matters
A screen-reader user cannot tell why a search finds nothing or finds too much, because the case setting it depends on is not announced.
Not a goal
What changed (motivation → approach → change)
Symptom: no on or off state on either Case sensitive button. Cause: the buttons carry no ARIA state and a fixed label.
components/SearchBar.tsx: the chat find bar case button carriesaria-pressed={caseSensitive}.components/MarkdownPanelBody.tsx: the document find bar case button carriesaria-pressed={findCase}.Backwards compatibility
Compatible: both buttons toggle the same setting with the same label; only an ARIA attribute is added.
Removes nothing: no key, prop, export or behaviour is taken away.
Tests
SearchBar.test.tsx: the case button reportsaria-pressedfalseandtruefrom thecaseSensitiveprop.MarkdownPanelFindEscape.test.tsx(MarkdownPanelCoverage.test.tsxis at the 2,000-line cap): the document find bar case button startsaria-pressed="false"and reportstrueafter a press.All three cases fail against
origin/mainand pass here (run with--no-cache).Proof: not provable -- frontend test (prove.py runs Python only)
Gate:
tsc -p tsconfig.app.json, eslint on changed files,check_file_line_cap.py, and every test file that mentionsSearchBar,ChatSidePanelsorMarkdownPanel(144 files) pass.Determinism: no timers, sleeps or ports; the tests render, click and read the DOM, waiting only on the find input opening.
Overlap: open PR #31792 also edits
MarkdownPanelBody.tsx(the comment hint near the top). No hunks overlap, andgit merge-treeof this head with #31792 reports no conflict.Manual verification
N/A — unit coverage sufficient: only an ARIA attribute is added, and the tests read it from the rendered DOM.
Screenshots / video
Why no screenshot: the buttons render the same pixels; only an
aria-pressedattribute is added.Related Issues
Fixes #31923
Sibling sweep
Swept: git grep -nE "onClick={[^}]*([Cc]ase|[Mm]atchCase)" -- website/src
Sibling: website/src/components/SearchBar.tsx -- changed here
Sibling: website/src/components/MarkdownPanelBody.tsx -- changed here
Pattern harvest
Rule candidate: review-prompt
Pattern: an on/off icon button with a fixed label whose state shows only by color and carries no aria-pressed
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)