fix(web): keep Settings focus and restart progress clear - #1116
Merged
Conversation
frahlg
force-pushed
the
fix/settings-dialog-focus
branch
from
September 7, 2026 19:34
5cc8178 to
0de0c9c
Compare
frahlg
marked this pull request as ready for review
September 7, 2026 19:40
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_8bd37f57-1623-4830-a9f6-397caa82baf0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Settings left keyboard focus behind its overlay. Tab could leave the form,
Escape did not close it, and Close did not return focus to the opening button.
The dialog now takes focus after loading, keeps Tab within its visible controls,
and returns focus on close, including when More opens it on mobile. Controls in
closed sections stay out of the tab order. An action that replaces its own
button keeps focus on the selected Settings tab.
The restart prompt keeps focus while open and makes the background inert.
Tab cycles through its two buttons; Escape chooses Restart later while idle.
During a pending restart, focus stays on the prompt and Escape cannot close
it. Closing restores the prior background state and focus. Progress stays
hidden until Restart now sends the request; a local CSS rule fixes the
earlier premature “Restarting…” message.
Validation:
make verifypasses.Chargers sections, in-form tab changes, Escape, Close and opener focus.
shows it; a failed request hides it again and enables both buttons. Tab and
Shift+Tab stay within the top prompt, including while buttons are disabled.
Escape closes it while idle and keeps it open while pending. Chrome's native
accessibility tree exposes only that prompt.
Browser checks used the actual web files with local synthetic APIs. No physical
box config or restart was performed. Human visual review remains per AGENTS.md.
Base: 8617c7e, including #1115. The coordinator reviewed the overlapping files
in #1052, #826 and #735: their settings.js help/escaping and style.css tooltip
changes cover separate code. This PR leaves those sections, the Weather tab,
maps and index.html untouched.
Note
Low Risk
Client-only settings UI and accessibility behavior; no API or config persistence changes beyond existing restart/save flows.
Overview
Improves keyboard and screen-reader behavior for the Settings overlay and the post-save restart required prompt.
Settings now exposes proper dialog semantics (
role,aria-modal, label), moves focus to the close control after config loads (without stealing focus during the fetch), traps Tab to visible/enabled controls (including closed<details>summaries only until opened), closes on Escape and backdrop click via sharedcloseSettings(), and returns focus to whoever opened it—including the More menu shortcut—not invalid hidden/disconnected openers. Tab re-renders that drop focus fall back to the active tab or close button.Restart prompt ignores duplicate save responses while open or pending, marks the inner panel as a modal dialog, sets
inerton other page roots (without clearing pre-existing inert), focuses Restart later, wraps Tab between the two actions, treats Escape as Later only when buttons are enabled, locks focus on the dialog during an in-flight restart (Escape cannot dismiss), and restores prior focus/inert on close. Restart progress stays hidden until Restart now runs; CSS adds#restart-progress.hidden { display: none }.Adds a large
settings-shell.test.mjssuite with a richer DOM shim covering these flows.Reviewed by Cursor Bugbot for commit 0de0c9c. Bugbot is set up for automated code reviews on this repo. Configure here.