fix(a11y): restore composer focus indicator in dark mode (A6) - #58
Merged
Conversation
Stop suppressing the chatbox conic ring and identical focus background that left dark-mode focus invisible. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughDark-mode chatbox variables now preserve the base focus background and ring visibility. Only the background transition remains disabled in dark mode. A Vitest regression test reads the CSS, extracts dark-mode variables, and verifies that the focus ring remains enabled and the focus background is not overridden. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/dom/composer-focus-a6.test.js`:
- Around line 29-31: Update the assertions in the composer focus test to first
extract the light/base :root block and verify that it defines
--chatbox-ring-display and --chatbox-focus-bg with their exact expected values.
Scope the existing block-related checks to this extracted :root content, while
preserving the dark-mode assertions that ensure the old overrides are absent.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 53dd897f-7cb9-4a50-8488-ba03e77307d9
📒 Files selected for processing (2)
public/app.csstests/dom/composer-focus-a6.test.js
Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Summary
Closes #52 ([a11y][A6]). In dark mode the composer had no visible focus indicator:
--chatbox-ring-displaywas forced tonone, and--chatbox-focus-bgmatched the resting--chatbox-bg, while the textarea's own DS focus ring stayed suppressed.Changes
Dark
:rootoverrides inpublic/app.cssno longer hide the conic ring or pin focus background to the resting plate. Dark mode now inherits--chatbox-ring-display: blockand--chatbox-focus-bg: var(--Colors-Backgrounds-Main-Top)from light:root(Main-Top resolves to Neutral-1300 in dark). Light mode unchanged.Ring colors (
#B2CDFFand siblings) clear 3:1 against the dark chatbox / page surfaces. App CSS only; no design-system token change (A7 focus-ring contrast remains a separate DS issue).Test plan
npm test(CSS token guards intests/dom/composer-focus-a6.test.js)prefers-reduced-motion: ring still appears (static, no spin)