Repository navigation
fix(ui): Settings switches drop keyboard focus while a change is saving - #178175
Conversation
- SettingsToggle, SettingsToggleRow and SettingsSegmented render the control-level disabled prop as aria-disabled instead of native disabled, so a focused control keeps focus when its page goes busy - their click and key handlers cancel the native toggle or selection while disabled; radio arrow keys are ignored; button-mode onClick is skipped - per-option disabled and fieldset disabling stay native - the shared dimmed style also matches [aria-disabled="true"] - browser tests cover switch, radio and button modes keeping focus and ignoring keys while busy, and a locked switch staying reachable but inert - consumer tests that read native disabled on these controls now read aria-disabled
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesShared Settings switches and choices retain keyboard focus while unavailable and reject further activation until saving finishes. Example: In Settings > Memory, press ArrowLeft to change Memory LanceDB to OpenClaw Memory while the save response is deferred.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a current keyboard-accessibility bug in shared Settings controls; no actionable defects remain in the reviewed patch, and exact-head CI is still running. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherSettings pages pass accepted values, availability, and callbacks into shared Solid controls, which render accessible inputs and forward permitted changes to existing mutation owners. flowchart LR
A[Keyboard or pointer] --> B[Shared Settings controls]
C[Page availability and values] --> B
B --> D[Activation guards]
D --> E[Existing mutation owner]
E --> F[Gateway or native settings]
F --> C
Technical reviewBest possible solution: Keep availability handling in the existing shared controls, preserving focus, guarded activation, and native fieldset and option restrictions. Do we have a high-confidence way to reproduce the issue? Current-main native-disabled bindings establish the reported mechanism, supported by the linked report's DOM trace and inspected screenshots; this read-only review ran no target code. Is this the best way to solve the issue? The patch fixes the cause at the existing shared owner without adding state, focus-restoration machinery, or caller-specific workarounds. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 35cb5aaa4510. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +10, Tests +198. Total +208 across 31 files. Added test files: 0. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (3 earlier review cycles)Reviewed October 23, 2026, 12:29 AM ET / 04:29 UTC (Revision 4). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Keep shared switches and choices focusable while unavailable and block activation until the setting settles. Preserve native option and fieldset disabling and align current-main consumers with the accessible state. Co-authored-by: Mitchell Etzel <[email protected]>
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
Preserve keyboard focus for saving settings controls and keep non-saving restrictions natively disabled. Related: #178175
…ng (openclaw#178175) Keep keyboard focus on shared Settings switches, radio choices, and segmented controls during autosave. Use aria-disabled with activation guards while retaining native fieldset and per-option disabling. Verified with keyboard regressions red on base and green on head, 399 distinct targeted cases, Chromium mock-Gateway interaction proof, and targeted lint, format, style, and type checks. Update consumer assertions to reflect accessible disabled state. No fresh provider-backed Gateway run. Co-authored-by: Mitchell Etzel <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
Preserve keyboard focus for saving settings controls and keep non-saving restrictions natively disabled. Related: openclaw#178175
…ng (#178175) Keep keyboard focus on shared Settings switches, radio choices, and segmented controls during autosave. Use aria-disabled with activation guards while retaining native fieldset and per-option disabling. Verified with keyboard regressions red on base and green on head, 399 distinct targeted cases, Chromium mock-Gateway interaction proof, and targeted lint, format, style, and type checks. Update consumer assertions to reflect accessible disabled state. No fresh provider-backed Gateway run. Co-authored-by: Mitchell Etzel <[email protected]> Co-authored-by: Peter Steinberger <[email protected]> Backport: adapt busy guards to B shared settings-controls handlers, retain native option/fieldset disabling, use accessible parent busy state and preserve B style/layout. Include keyboard-focus regressions; not executed locally. (cherry picked from commit b44f145) Co-authored-by: RomneyDa <[email protected]>
Remove the unused avatar-cache test assert import, brace the unchanged async event collection loop, and apply the canonical settings selector wrapping. No assertions, transport behavior, CSS selectors, or declarations change. Follow-ups to 7105904 (#185112), 5ddd59a (#177659), and a84f8f4 (#178175). Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: Mitchell Etzel <[email protected]> Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 06ed73025cd0704a6f1d2778bbab23e682fa0efa)
Closes #178174
What Problem This Solves
Fixes keyboard focus disappearing from Settings switches and segmented choices while an automatic save is in progress.
User Impact
Keyboard users can change a setting, wait for it to save, and continue from the same control. Further activation is ignored while the save is pending.
Why This Change Was Made
Native
disabledmoves focus away from the active control. Shared Settings controls now expose control-level unavailability witharia-disabled, cancel native activation while unavailable, and keep the existing disabled appearance. Disabled fieldsets and individually unavailable options retain native disabling.Control-level locked settings also remain reachable with Tab so their label and unavailable state can be discovered. This changes their keyboard reachability, not permission to modify them; guarded callbacks still reject activation.
Thanks to @etzelm (Mitchell Etzel) for the fix and regression coverage.
Evidence
BODY; all three pass with this fix. Locked-control keyboard coverage also passes.BODY; after: focus stayed on the selected radio through saving and completion. A second arrow key during saving sent no extra write; both runs sent exactly one plugin mutation.e692239327bdc49a81577e863726af8d7bfdd9be; the watcher confirmed no pending current-head checks. ClawSweeper reviewed the same head with no findings.Before, while saving:
After, while saving: