Skip to content

fix(a11y): improve free model badge contrast ratio#3685

Open
IamCoder18 wants to merge 1 commit into
Kilo-Org:mainfrom
IamCoder18:fix/free-model-badge-contrast
Open

fix(a11y): improve free model badge contrast ratio#3685
IamCoder18 wants to merge 1 commit into
Kilo-Org:mainfrom
IamCoder18:fix/free-model-badge-contrast

Conversation

@IamCoder18

@IamCoder18 IamCoder18 commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Improved the WCAG contrast ratio of the Free badge in model pickers by darkening the green pill from bg-green-500 to bg-green-800, restoring accessibility compliance for normal text.

Closes #3686

Verification

  • Visually inspected the Free badge in model comboboxes.

Visual Changes

Before After
image after_free_badge

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.

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">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@kilo-code-bot

kilo-code-bot Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 1 Issue Found | Recommendation: Merge (issue is non-blocking)

Executive Summary

The 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

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 1
Issue Details (click to expand)

SUGGESTION

File Line Issue
apps/web/src/components/shared/ModelCombobox.tsx 464 Badge uses solid bg-green-800 text-white instead of the design system's mandated translucent pill pattern (bg-green-500/20 text-green-400 ring-1 ring-green-500/20) per DESIGN.md
Files Reviewed (1 file)
  • apps/web/src/components/shared/ModelCombobox.tsx — 1 suggestion

Fix these issues in Kilo Cloud


Reviewed by claude-4.6-sonnet-20260217 · 543,677 tokens

Review guidance: REVIEW.md from base branch main

@Drixled Drixled self-requested a review June 5, 2026 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Free Model green pill fails WCAG AA/AAA contrast requirements

2 participants