fix(a11y): remove low-contrast translucency on command palette headings - #425
Conversation
The "Suggested"/"All commands" section-heading rows in CommandPalette used bg-[var(--sc-surface-raised)]/95 backdrop-blur-sm. The raw --sc-text-muted / --sc-surface-raised token pair passes WCAG AA (~5.28:1) on every theme, but the 95%-opacity blend against whatever scrolls underneath drags the actually-rendered contrast down to 4.17:1 on the sepia theme - below the 4.5:1 AA threshold for 12px normal-weight text. Caught by @axe-core/playwright 4.13.0's stricter color-contrast check (dependabot/npm_and_yarn/axe-core/playwright-4.13.0, PR #415) failing tests/e2e/a11y.spec.ts's command-palette-open check; the older 4.11.3 didn't catch it. These heading rows aren't actually sticky (they're regular rows inside the react-virtual virtualized list, absolutely positioned and translated like every other row) - the translucency/blur served no functional "header floats over scrolling content" purpose, so making the background solid removes the failure mode entirely instead of re-tuning colors per theme. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing |
🤖 CodeAnt AI — Review Status
|
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 38 minutes Limit details: You’ve used the included review currently available. Your 60 included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?Wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
Comment |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdjusts the command palette heading row styling to use a solid raised-surface background instead of a translucent blurred one, resolving an axe-core-detected color-contrast accessibility issue. Flow diagram for CommandPalette heading row rendering changeflowchart TD
A[render CommandPalette row] --> B{row.kind === 'heading'}
B -- yes --> C[render div role=presentation]
C --> D["apply class bg-[var(--sc-surface-raised)]"]
B -- no --> E[render non-heading row as before]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
🏁 CodeAnt Quality Gate ResultsCommit: ✅ Overall Status: PASSEDQuality Gate Details
|
There was a problem hiding this comment.
This accessibility fix correctly addresses the WCAG AA contrast issue by removing unnecessary translucency from command palette section headings. The change is minimal, focused, and resolves the 4.17:1 contrast ratio issue in the sepia theme by making the background solid. The fix is appropriate since these rows are not sticky and the translucency served no functional purpose.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
User description
Summary
--sc-text-mutedtext. The raw token pair passes WCAG AA (~5.28:1) on every theme, but the opacity blend drags the actually-rendered contrast down to 4.17:1 on the sepia theme, below the 4.5:1 AA threshold.react-virtualvirtualized list — so the translucency served no functional purpose. Made the background solid instead of re-tuning per-theme colors.Why now
Caught by
@axe-core/playwright4.13.0's stricter color-contrast detection (dependabot PR #415, currently blocked on this) failingtests/e2e/a11y.spec.ts's "command palette open has no serious axe violations" check. The older 4.11.3 didn't catch it — this is a real pre-existing bug the version bump exposed, not a false positive.Test plan
pnpm exec biome check components/CommandPalette.tsx— cleanpnpm exec vitest run tests/unit/CommandPalette.test.tsx— 7/7 passSummary by Sourcery
Bug Fixes:
CodeAnt-AI Description
Improve command palette heading readability across themes
What Changed
Impact
✅ Higher-contrast command palette headings✅ Reliable accessibility checks across themes💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.