Skip to content

fix(auto-research): mark the campaign detail toggles as disclosures - #35524

Draft
dodgeblaster wants to merge 1 commit into
mainfrom
kc-wt-32047
Draft

dodgeblaster wants to merge 1 commit into
mainfrom
kc-wt-32047

Conversation

@dodgeblaster

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: a screen-reader user hears whether each in-place toggle in an Auto Research campaign's detail view is open or closed, starting with the long-question Show more button.

A campaign question longer than 280 characters is clamped to three lines under a Show more / Show less button. The button carries no aria-expanded and its chevrons are not hidden from assistive tech, so a screen reader hears only a label change and no expanded or collapsed state. Each finding card and the sub-question guidance list in the same view expand in place with the same gap.

Why it matters

A disclosure with no state leaves a screen-reader user guessing whether more content is now on the page, and gives no way to reach it.

Not a goal

  • Any visual change to the clamp, the cards or the guidance list.
  • Toggles outside the Auto Research campaign detail view.
  • Replacing the raw <button> or <Clickable> with another component.

What changed (motivation → approach → change)

Symptom: Show more, a finding card and the guidance list announce no open or closed state. Cause: none of the three toggles carries ARIA state, and their chevrons are exposed. Change, in website/src/apps/auto-research/ResearchLabPage.tsx: each toggle gets aria-expanded bound to its open state and aria-controls naming the content it reveals (ids from useId), and its chevron icons get aria-hidden. The Show more button also gets type="button". This matches the View report toggle (#32046) and the GrillTree collapse buttons in the same app.

Backwards compatibility

Compatible: only ARIA attributes and element ids are added; rendering and behaviour stay the same.

Removes nothing: the diff adds attributes and test cases and deletes no element, key or test.

Tests

  • website/src/apps/auto-research/ResearchLabPage.reportToggle.test.tsx, which already covers the View report toggle in this view, gains two cases:
    • a 300+ character question: Show more starts with aria-expanded="false", aria-controls names the element holding the question text, its chevron is aria-hidden, and it flips to true / Show less and back on clicks.
    • a running campaign with one finding: the finding card and the guidance list toggle each flip aria-expanded false → true → false, name an element that exists once open, and have an aria-hidden chevron.
  • Both new cases fail on main (aria-expanded absent); all 119 tests under src/apps/auto-research/ pass with the fix. The file passed 5 runs in a row with --sequence.shuffle.

Proof: not provable -- frontend test (prove.py runs Python only)

Manual verification

N/A — unit coverage sufficient: the change is ARIA attributes and ids only, asserted through role-based queries.

Screenshots / video

Why no screenshot: the change adds ARIA attributes and element ids only, so nothing on screen changes.

Related Issues

Fixes #32047

Sibling sweep

Swept: git grep -nE "ChevronDown|setOpen(|set[A-Z][a-zA-Z]*(v => !v)" -- website/src/apps/auto-research/
Sibling: website/src/apps/auto-research/ResearchLabPage.tsx:142 -- changed here -- the finding card expand toggle
Sibling: website/src/apps/auto-research/ResearchLabPage.tsx:639 -- changed here -- the sub-question guidance list toggle
Sibling: website/src/apps/auto-research/ResearchLabPage.tsx:831 -- not affected -- the View report toggle already has aria-expanded and aria-controls
Sibling: website/src/apps/auto-research/GrillTree.tsx:106 -- not affected -- the grill tree collapse button already has aria-expanded

Pattern harvest

Not generalizable: a handful of hand-built toggles in one view; a lint for every expand state would need to know which booleans gate visible content.

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

Contribution License Agreement

Contributed under the Apache-2.0 license of this project.

@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 11, 2026
@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

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

UX-Verdict: PASS

No screenshot needed: the diff adds only ARIA state, ids and type="button", and none of that shows on screen. It brings Show more, the finding card and the guidance toggle in line with the existing View report disclosure.

[UX-REVIEWED] 00d0559

Description read

[DESCRIPTION-READ] 56467fedd0fbb9047bfc2440a41a7e818945fa6b7b1293c4c2af37f9b724c9ee

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 11, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 00d0559d3316d09673c14e632608e24eec633e9d — 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 blocks. All four items add ARIA state to existing toggles for #32047, at mechanism level, and the sibling sweep covers this view.

What this change ships

Inventory (4 items) — 4 justified

Intent: a screen-reader user can hear whether each expand/collapse toggle in the campaign detail view is open or closed. This is a FIX.

  1. The long-question Show more / Show less button now announces its expanded or collapsed state, names the question text as what it controls, and hides its chevron from screen readers — justified
  2. Each finding card's expand toggle now announces its state, names its detail region, and hides its chevron — justified
  3. The sub-question guidance list toggle now announces its state, names its list, and hides its chevron — justified
  4. The Show more button is now explicitly type="button" — justified

[FIRST-PRINCIPLES-REVIEWED] 00d0559

Description read

[DESCRIPTION-READ] 5f949727ad82a429ad2b7b4cfdda789492b6b8a8f7aaf2023ce38f1fe2f0f21c

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 11, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

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

Design-Verdict: PASS

No design-level concerns: adding ARIA state to three in-place toggles is a proportionate fix aimed at the stated harm, and it matches the existing View report pattern.

Notes

  • auto-research is pinned in src/kiro_crew/apps/adoption-pins.json (commit a4688e73). An adopted host runs this app from KiroCrewCaptain/kirocrew-app-auto-research, so a change to the wheel copy alone never reaches those screen-reader users. Port the fix there and add an App repo: line; PR Hygiene's adopted_wheel_copy_check.py requires it.

[DESIGN-REVIEWED] 00d0559

Description read

[DESCRIPTION-READ] 528825ba23c495ca08fef0f4715d0c70cc9f88c4b22ddcbcdbc4ede36fdb438c

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 11, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 00d0559d3316d09673c14e632608e24eec633e9d — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 00d0559

Verdict parsed from the review's SHA-scoped output markers for commit 00d0559d3316d09673c14e632608e24eec633e9d.

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

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 00d0559d3316d09673c14e632608e24eec633e9d and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 00d0559

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

@dodgeblaster

Copy link
Copy Markdown
Contributor Author

Rebased onto current main as 1642cf6. The patch is unchanged and still touches only the two auto-research files.

Why: on 4072323, Backend Tests (Windows) (8) failed in test/test_mcp_remote_transport.py::TestRewriter (assert 0 == 1). That failure was on main and is fixed by #35541 (Fixes #35535), which landed after this branch's base. The first run's Windows shards passed their tests and then failed on an artifact upload that got HTML instead of JSON. A full rerun cleared that.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 11, 2026
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Nov 12, 2026
@dodgeblaster

Copy link
Copy Markdown
Contributor Author

Disposition: rebutted — GPT 6.1 F1, website/src/pages/chat/UserMessage.tsx:1037 (max-two-buttons-per-row)

Not in this PR's diff: git diff --name-only <merge-base>..6c4b7c6d98 lists only website/src/apps/auto-research/ResearchLabPage.tsx and its test.
The inline Edit & Resend button at UserMessage.tsx:1037 arrived with #29979 (merge 2d4848e), which landed on main after this branch's base 758e63c; the review read it through GitHub's merge ref.
The adjudication agrees: the merge ref differs from main only in the auto-research files, and the rule applies only to rows a diff grows.
This PR adds no control to any action row; it adds ARIA attributes and ids to existing auto-research toggles.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 12, 2026
The campaign detail clamps a question longer than 280 characters to
three lines under a Show more / Show less button. The button carried
no aria-expanded and its chevrons were exposed to assistive tech, so a
screen reader heard only a label change. Each finding card and the
sub-question guidance list in the same view open and close in place
with the same gap.

Each of the three toggles now carries aria-expanded bound to its open
state and aria-controls naming the content it reveals, and its chevron
is aria-hidden; the Show more button also gets type="button". This
matches the View report toggle in the same view. The report toggle's
test file covers all four.

Fixes #32047
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 17, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor

Rebased onto main as 00d0559 (patch unchanged). All AI review lanes now pass on this head, including GPT 6.1 (the earlier UserMessage.tsx finding is gone). One check still fails: PR Hygiene's adopted-app rule. auto-research is now an adopted app, so this fix must first land in KiroCrewCaptain/kirocrew-app-auto-research (ui/src/ResearchLabPage.tsx there has only the View report toggle marked up). @dodgeblaster, could you port the change to that repo, then add App repo: KiroCrewCaptain/kirocrew-app-auto-research#<PR> (or @<commit>) to this PR's body? No push is needed after that.

This branch has not been deployed

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

Labels

readiness: action required A blocking check or review needs attention

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auto Research: the campaign question Show more toggle has no aria-expanded

2 participants