Repository navigation
fix(web): announce the Safe-mode confirm and Saved Credentials as dialogs; Escape closes Saved Credentials - #582
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit bf24fd4. Configure here.
| }, [visible]); | ||
|
|
||
| // Escape closes the manager, but not while the credential form is open on top. | ||
| useEscapeKey(onClose, open && !adding && !editing); |
Contributor
There was a problem hiding this comment.
Form layer leaves Escape unhandled
Medium Severity
useEscapeKey is disabled while adding or editing so Escape can close the credential form on top, but ConnectionModal has no Escape handler. After Add or Edit Credential, Escape dismisses neither layer. Users who just used Escape to close Saved Credentials now get no response.
Reviewed by Cursor Bugbot for commit bf24fd4. Configure here.
…logs; Escape closes Saved Credentials From the 2026-11-01 manual walk: - The Safe-mode confirm (sql-write-confirm) and Saved Credentials were plain divs: a screen reader was not told a dialog had opened. Both now have role="dialog", aria-modal and aria-labelledby on their title. - Saved Credentials did not close on Escape, unlike the other dialogs, and its close button was an unnamed icon. It closes on Escape now, but not while the credential form is open on top, and the button is named. useEscapeKey (shared/lib) is the Escape listener WorkspaceSettingsDialog and others each write by hand, with an enabled flag for layered dialogs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
huyplb
force-pushed
the
fix/dialog-a11y
branch
from
November 1, 2026 21:28
bf24fd4 to
677a7ed
Compare
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.


From the 2026-11-01 manual walk.
Safe-mode confirm (
WriteConfirmDialog,sql-write-confirm): a plaindiv.modal-overlay, so a screen reader wasn't told a dialog had opened. It now hasrole="dialog",aria-modal="true", andaria-labelledbypointing at its title, e.g. Safe mode: run UPDATE statements?Saved Credentials (
CredentialManager):cred-close-btn) is now named Close saved credentials and hastype="button"useEscapeKey(shared/lib/useEscapeKey.ts) is the Escape listener thatWorkspaceSettingsDialogand others each write by hand: a ref for the callback, registered once, skipping keys another handler already claimed. It adds anenabledflag for layered dialogs. I haven't moved the existing hand-written listeners over, to keep this PR small.Tests:
WriteConfirmDialog.test.tsx: role and nameCredentialManager.test.tsx: role, name and close-button name; Escape closes; Escape with the form open doesn'tA/B: without the fix, 3 of the 4 fail. With Escape unguarded, the form-on-top test fails. With the fix, all pass.
Live check: I opened Saved Credentials in the app and confirmed the dialog role, name and button label, and that a real Escape closes it.
tsc, eslint and the naming test are clean.🤖 Generated with Claude Code
Note
Low Risk
UI-only accessibility and Escape handling; no auth, SQL execution, or data persistence changes.
Overview
Improves screen reader and keyboard behavior for two overlays that were plain divs before.
WriteConfirmDialog now exposes
role="dialog",aria-modal="true", andaria-labelledbytied to its dynamic title (e.g. Safe mode: run UPDATE statements?) viauseId.Saved Credentials (
CredentialManager) gets the same dialog semantics, names the icon close control Close saved credentials (type="button"), and closes on Escape through a new shareduseEscapeKeyhook. Escape is disabled while add/edit opensConnectionModalon top so only the top layer dismisses.Adds Vitest coverage for dialog role/name and Escape layering; test-id docs note the close button label.
Reviewed by Cursor Bugbot for commit 677a7ed. Bugbot is set up for automated code reviews on this repo. Configure here.