Repository navigation
fix(feedback): Improve dialog keyboard access and input contrast - #26194
david-kirkland wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 67b5d1d. Configure here.
| } else { | ||
| dialog.setAttribute('open', ''); | ||
| dialog.querySelector<HTMLElement>('[autofocus]')?.focus(); | ||
| } |
There was a problem hiding this comment.
showModal throw bricks the widget
High Severity
showModal() is called without a try/catch, while isOpen is already set to true. showModal() throws InvalidStateError when the dialog is disconnected or the document is sandboxed without allow-modals. That exception escapes the layout effect, and later open() calls no-op because isOpen stays true, so the widget never opens again. The missing-showModal fallback never runs in these cases.
Additional Locations (1)
Triggered by project rule: PR Review Guidelines for Cursor Bot
Reviewed by Cursor Bugbot for commit 67b5d1d. Configure here.
| } | ||
| renderContent(false); | ||
| DOCUMENT.body.style.overflow = originalOverflow; | ||
| restoreFocus(); |
There was a problem hiding this comment.
Focus restored too early on submit
Medium Severity
close() always calls restoreFocus(), and successful submit calls close() before the success message appears. Focus therefore moves to the still-hidden default launcher (aria-hidden / visibility: hidden) while the thank-you toast is on screen. If the toast later times out, close() runs again and can steal focus from whatever the user moved to.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 67b5d1d. Configure here.


Fixes #26081
Why: Improve the feedback dialog’s accessibility:
Escape-to-close is also improved, though its absence alone is not necessarily a WCAG violation.
How to review: Check dialog focus, keyboard behavior, accessible naming, and field contrast.