Repository navigation
fix(a11y): keep focus on the knowledge Generate now while it runs - #32539
Conversation
The smart-search banner's Generate now button took a native disabled while its embedding run was in flight. A disabled button leaves the tab order, so a keyboard press dropped focus to the page until the run settled. Mark the busy button aria-disabled and ignore a second press instead, the way the Ops Mission Control refresh does.
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: |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. This is a one-button fix that uses the inline What this change shipsInventory (3 items) — 3 justifiedIntent: a keyboard user who presses Generate now keeps focus on the button while the embedding run is in flight. FIX.
[FIRST-PRINCIPLES-REVIEWED] b73620e Description read[DESCRIPTION-READ] 51487adcc632ec5bcfa793a854437bafa7b873d659879e8c105d07da9519fe79 That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)UX-level review of UX-Verdict: PASS cannot evaluate: missing a screenshot of Generate now in its busy "Generating…" state. The diff adds a visible dim to that state, and the PR supplies no image, so the blind read was not performed. Evidence gaps
Notes
[UX-REVIEWED] b73620e Description read[DESCRIPTION-READ] 965195ffd6d6cbee8c10547c496792405f76da8f2cd489df5799e1537ca7de7f 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 |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the fix removes the actual cause (native Notes
[DESIGN-REVIEWED] b73620e Description read[DESCRIPTION-READ] 1fef12b9e0d6f8baad6f3eb5ab344b17080c7013e464b8b6d33e93905fd29778 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 |
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: |
bolichen97
left a comment
There was a problem hiding this comment.
Approving at b73620e. All checks pass and there are no change requests. The author already holds auto-merge, so I am not setting it.
What I checked:
- The knowledge "Generate now" link-button uses
aria-disabledplus anif (!isPending)guard instead of nativedisabled. It keeps keyboard focus while the run is in flight, and a second press starts nothing. - It now sets
type="button", so it cannot submit an enclosing form. The busy look comes fromaria-disabled:classes. - Frontend only. No regex.
…2539) The smart-search banner's Generate now button took a native disabled while its embedding run was in flight. A disabled button leaves the tab order, so a keyboard press dropped focus to the page until the run settled. Mark the busy button aria-disabled and ignore a second press instead, the way the Ops Mission Control refresh does. (cherry picked from commit e492bc0) Original author: Rohan Khanderia (#32539).
Problem / Motivation
Goal: pressing Generate now on the Knowledge page's smart-search banner from the keyboard keeps focus on the button while the embedding run is in flight, instead of dropping it to the page.
The button took a native
disabledwhile the run was pending. A disabled button leaves the tab order, so focus fell to the page until the run settled.Why it matters
A keyboard or screen-reader user who starts the run loses their place and cannot tell where focus went.
Not a goal
What changed (motivation → approach → change)
Symptom: focus drops on Generate now. Cause: native
disabledwhile pending. Change:website/src/pages/knowledge/EmbeddingStatus.tsxmarks the busy buttonaria-disabledwith a dimmed style and guards the click, so a second press does nothing, the way the Ops Mission Control refresh does (#32049). Its "Generating…" label is unchanged.Backwards compatibility
Compatible: the button reads and is named as before; a second press while the run is in flight still starts nothing.
Removes nothing.
Tests
website/src/test/EmbeddingStatusCov80.test.tsx: a new case focuses Generate now, presses it while the run is held open, checks it isaria-disabledand notdisabled, keeps focus, starts no second run, then keeps focus once the run settles. It fails on main (the busy button wasdisabled), and it also fails with the click guard removed. All 227 tests in the Knowledge and banner suites pass.Proof: not provable -- frontend test (prove.py runs Python only)
Local review: GPT (on gpt-5.6-sol, CI pins gpt-6.1-sol) and Opus (on the session's Auto model): no findings. Opus's one discovery note, that the second-press assertion could pass without the guard, was hardened anyway with a microtask flush.
Manual verification
N/A — unit coverage sufficient: the change is focus and ARIA state, covered by the test above.
Why no screenshot: the busy button keeps its "Generating…" label; only its focusability, ARIA state and a light dim change.
Related Issues
Fixes #32531
Deferred: #32532 (item save, Restore/Archive, Delete and ignore-pattern Save on the Knowledge page)
Sibling sweep
Swept: git grep -n "disabled={" -- website/src/pages/knowledge
Sibling: website/src/pages/knowledge/EmbeddingStatus.tsx -- fixed -- Generate now
Sibling: website/src/pages/knowledge/DetailView.tsx -- deferred -- save, Restore/Archive, Delete, Deferred: #32532
Sibling: website/src/pages/knowledge/IgnorePatternsEditor.tsx -- deferred -- Save, Deferred: #32532
Sibling: website/src/pages/knowledge/KnowledgeGraph.tsx -- deferred -- Retry unmounts during its retry, noted in #32532
Pattern harvest
Not generalizable: the remaining sites are listed in #32532.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributed under the Apache-2.0 license of this project.