fix(a11y): improve free model badge contrast ratio#3685
Conversation
Green pill text on bg-green-600 failed WCAG AA/AAA. Increase shade to bg-green-800 to reach ~7.5:1 contrast against white text.
| return ( | ||
| <span className="inline-flex shrink-0 items-center gap-1"> | ||
| <span className="inline-flex shrink-0 items-center rounded-full bg-green-500 px-1.5 py-0.5 text-[10px] font-medium text-white"> | ||
| <span className="inline-flex shrink-0 items-center rounded-full bg-green-800 px-1.5 py-0.5 text-[10px] font-medium text-white"> |
There was a problem hiding this comment.
SUGGESTION: Badge style deviates from the design system's mandated pattern
DESIGN.md mandates that all status badges use the translucent pattern:
bg-{color}-500/20 text-{color}-400 ring-1 ring-{color}-500/20
The current badge uses a solid bg-green-800 text-white fill. While this PR improves contrast (7.09:1 ✓ WCAG AAA) compared to the previous bg-green-500 (~2.5:1 ✗), the long-term fix should align with the design system by switching to the translucent pill pattern, e.g.:
<span class="inline-flex shrink-0 items-center rounded-full bg-green-500/20 text-green-400 ring-1 ring-green-500/20 px-1.5 py-0.5 text-[10px] font-medium">That pattern uses text-green-400 on a dark background which achieves sufficient contrast without needing to use a dark solid fill.
Code Review SummaryStatus: 1 Issue Found | Recommendation: Merge (issue is non-blocking) Executive SummaryThe accessibility fix is valid and improves WCAG contrast from ~2.5:1 to 7.09:1, but the badge style deviates from the design system's mandated translucent pattern. Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (1 file)
Fix these issues in Kilo Cloud Reviewed by claude-4.6-sonnet-20260217 · 543,677 tokens Review guidance: REVIEW.md from base branch |
Summary
Improved the WCAG contrast ratio of the Free badge in model pickers by darkening the green pill from
bg-green-500tobg-green-800, restoring accessibility compliance for normal text.Closes #3686
Verification
Visual Changes
Reviewer Notes
The new shade was also chosen because it better matches the app's dark-mode palette. Contrast measured at 7.09:1 against white text.