Glin UI

Visual accessibility

Color Contrast Validation

Check contrast in both themes so depth, blur, and color never cost readability.

WCAG targets

WCAG 2.x contrast ratios. AA is the common release bar. AAA is a stricter goal.

WCAG contrast targets by content type
ContentAAAAA
Body text4.5:17:1
Large text (24px, or 19px bold)3:14.5:1
UI components and focus rings3:1No AAA target

Token pairs

Ratios computed from the OKLCH values in the tokens package. The color explorer shows the same AA and AAA badges live for any color you pick.

Contrast ratios for core Glin UI token pairs
PairThemeRatioAA 4.5AAA 7
Foreground on backgroundLight16.17:1Passes AAPasses AAA
Muted on backgroundLight5.28:1Passes AAFails Below AAA
Accent on backgroundLight5.06:1Passes AAFails Below AAA
Accent foreground on accentLight5.12:1Passes AAFails Below AAA
Foreground on backgroundDark16.59:1Passes AAPasses AAA
Muted on backgroundDark5.82:1Passes AAFails Below AAA
Accent on backgroundDark9.37:1Passes AAPasses AAA
Accent foreground on accentDark9.37:1Passes AAPasses AAA

Contrast Checklist

Run this pass for every major visual update.

Testing text on glass

A translucent surface has no single background color. Sample the busiest part of the backdrop behind the text and measure against that, in both themes.

<div className="rounded-xl border border-border/60 bg-[var(--glass-3-surface)] p-4">
<p className="text-sm text-neutral-700 dark:text-neutral-200">
Secondary copy keeps AA contrast on glass surfaces.
</p>
<a
href="#"
className="mt-2 inline-flex text-sm font-medium text-[var(--color-foreground)] underline underline-offset-4"
>
Read the full accessibility spec
</a>
</div>
# Suggested release audit workflow
pnpm --filter @glinui/docs build
# Then validate key routes with browser accessibility tooling:
# - /docs/getting-started
# - /docs/components/radix/button
# - /docs/components/radix/table
# - /docs/forms-accessibility