Skip to content

fix(a11y): expose on state of the find bar case-sensitive toggles - #31927

Merged
RohanK6 merged 1 commit into
mainfrom
crew/conductor/search-case-pressed-r23
Nov 7, 2026
Merged

RohanK6 merged 1 commit into
mainfrom
crew/conductor/search-case-pressed-r23

Conversation

@RohanK6

@RohanK6 RohanK6 commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Changing how either find bar matches text, or its labels and keys.
  • Other toggles that lack an ARIA state; this PR covers the two case toggles.

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 carries aria-pressed={caseSensitive}.
  • components/MarkdownPanelBody.tsx: the document find bar case button carries aria-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 reports aria-pressed false and true from the caseSensitive prop.
  • MarkdownPanelFindEscape.test.tsx (MarkdownPanelCoverage.test.tsx is at the 2,000-line cap): the document find bar case button starts aria-pressed="false" and reports true after a press.

All three cases fail against origin/main and 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 mentions SearchBar, ChatSidePanels or MarkdownPanel (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, and git merge-tree of 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-pressed attribute 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

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

@RohanK6
RohanK6 requested review from a team and KiroCrewCaptain as code owners November 7, 2026 00:11
@RohanK6
RohanK6 requested a review from tim-finnigan November 7, 2026 00:11
@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 643fe469fbb5400e790ad33081130d8d1d1d8c8b — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks. Adding aria-pressed to the two case toggles gives screen readers their on/off state with no visual or behavioural change, so no rendered evidence is needed.

[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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of 643fe469fbb5400e790ad33081130d8d1d1d8c8b — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

Nothing to check: the only change is aria-pressed on two existing Case sensitive buttons. Nothing on screen changes, so there is nothing a screenshot or the blind read could check.

[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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 643fe469fbb5400e790ad33081130d8d1d1d8c8b — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Nothing to check.

What this change ships

Inventory (2 items) — 2 justified

Intent: let a screen-reader user hear whether case matching is on in the chat and document find bars. This is a FIX (#31923).

  1. A screen reader now announces the chat find bar's Case sensitive button as pressed or not pressed. — justified
  2. A screen reader now announces the document find bar's Case sensitive button as pressed or not pressed. — justified

[FIRST-PRINCIPLES-REVIEWED] 643fe46

Description read

[DESCRIPTION-READ] 0ac5baf929c888a14652360b14838f5c57743211abaaca951ea121e26fe6b202

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 643fe469fbb5400e790ad33081130d8d1d1d8c8b — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 643fe46

Verdict parsed from the review's SHA-scoped output markers for commit 643fe469fbb5400e790ad33081130d8d1d1d8c8b.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 643fe469fbb5400e790ad33081130d8d1d1d8c8b false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 643fe469fbb5400e790ad33081130d8d1d1d8c8b and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 643fe46

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 643fe469fbb5400e790ad33081130d8d1d1d8c8b false-positive: <reason, 20 to 500 characters>

@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 7, 2026
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.
@RohanK6
RohanK6 force-pushed the crew/conductor/search-case-pressed-r23 branch from db3567e to 643fe46 Compare November 7, 2026 01:13
@RohanK6

RohanK6 commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

Fixed in 643fe46. Frontend Ratchets & i18n was right: the new test pushed MarkdownPanelCoverage.test.tsx to 2,008 lines, over the 2,000-line cap. The test now lives in MarkdownPanelFindEscape.test.tsx, which already mounts the find bar, so the coverage file is back to its 2,000 lines on main. check_file_line_cap.py passes. Sensitive Change Review and Publish readiness signal were rate-limit reds (API rate limit exceeded at 00:12Z), and the push re-runs them. Rebased onto 1f819b8.

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 7, 2026
@RohanK6
RohanK6 enabled auto-merge (squash) November 7, 2026 03:02

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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.

@RohanK6
RohanK6 merged commit 78cae13 into main Nov 7, 2026
99 of 108 checks passed
@RohanK6
RohanK6 deleted the crew/conductor/search-case-pressed-r23 branch November 7, 2026 03:07
buluoray added a commit that referenced this pull request Nov 8, 2026
…1927)

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.

(cherry picked from commit 78cae13)

Original author: Rohan Khanderia (#31927).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

readiness: passed Eligible automated validation passed for the current revision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Find bars: the Case sensitive toggle has no aria-pressed

2 participants