Skip to content

UIKit docs light theme contrast review

Date: 2026-07-04

Target: https://uikit.chromvoid.com

Scope: rendered text contrast in the published UIKit VitePress docs light theme. The audit used WCAG AA text thresholds: 4.5:1 for normal text and 3:1 for large text. Hidden and disabled text was excluded.

Route source: packages/uikit/docs/.vitepress/dist/**/*.html, excluding 404.html.

Visit policy: one browser navigation per listed URL. The pass opened 72 URLs once each in Chromium, with vitepress-theme-appearance=light, data-theme="light", colorScheme=light, and a 1440x1100 viewport. All URLs returned HTTP 200.

Summary

FindingSeverityAffected pagesLowest ratioRequired
Footer VitePress links use a too-light brand cyanP1712.25:14.5:1
Light code-block syntax colors fail on docs code backgroundP1123.22:14.5:1
Component catalog stat-card inline code is too lightP211.99:14.5:1
cv-field error text is slightly under threshold in light themeP214.29:14.5:1

The home page / had no text-contrast failures in this pass.

Findings

The VitePress doc footer renders the edit link and previous/next page titles in rgb(0 184 204) over the light docs background rgb(244 248 251), producing 2.25:1. This is well below the 4.5:1 requirement for normal text.

Examples:

URLTextRatio
/guide/architecture.htmlEdit this page on GitHub2.25:1
/guide/architecture.htmlGetting Started2.25:1
/components/cv-theme-provider2.25:1
/components/window-splitter.htmlEdit this page on GitHub2.25:1

Likely source: packages/uikit/docs/.vitepress/theme/custom.css light theme maps --vp-c-brand-1 to --cv-color-primary at line 2225. VitePress footer links are outside .vp-doc a, so they do not receive the darker light-theme override at lines 2353-2369.

Recommended fix: in the light theme, either map the VitePress brand link token to --cv-color-primary-darker or add a scoped .VPDocFooter light-theme override for footer anchors. Keep the source of truth in docs theme tokens rather than patching individual generated pages.

Affected pages: every audited page except /.

P1. Code-block syntax colors fail in light theme

Several Shiki github-light token colors fall below 4.5:1 on the docs light code background rgb(242 246 251).

Observed failing token groups:

Token colorExample textRatio
rgb(227 98 9)value, activeId, --cv-color-accent3.22:1
rgb(215 58 73)import, type, const, =4.22:1
rgb(34 134 58)cv-accordion, cv-theme-provider4.26:1
rgb(106 115 125)comments such as <!-- Basic context menu -->4.44:1

Likely source: packages/uikit/docs/.vitepress/theme/custom.css sets --vp-code-block-bg: var(--cv-color-surface-2) at line 2235 and styles code containers at lines 2446-2454, but the Shiki span colors remain from the github-light theme.

Recommended fix: switch the light code theme to an accessible high-contrast palette, or override the specific Shiki token colors in [data-theme='light'] so every token clears 4.5:1 on --vp-code-block-bg. Changing only the background will not fix the orange token, which already fails on very light surfaces.

Affected pages:

  • /guide/getting-started.html
  • /guide/theming.html
  • /components/accordion.html
  • /components/code-input.html
  • /components/context-menu.html
  • /components/image-viewer.html
  • /components/menu.html
  • /components/qr-code.html
  • /components/shortcut.html
  • /components/theme-palette.html
  • /components/theme-provider.html
  • /components/tooltip.html

P2. Component catalog inline code label fails

On /components/, the stat-card label Synced from specs/components contains inline <code>specs/components</code> rendered as rgb(0 184 204) on rgb(230 234 240), producing only 1.99:1.

Likely source:

  • packages/uikit/docs/.vitepress/theme/components/ComponentCatalog.vue uses <span class="uikit-stat-label">Synced from <code>specs/components</code></span> at line 26.
  • packages/uikit/docs/.vitepress/theme/custom.css only covers inline code inside p, li, td, and th at lines 2446-2454, so this span code case is not covered.

Recommended fix: add a light-theme inline-code rule for .uikit-stat-label code or generalize the docs inline-code selector to cover non-paragraph labels while keeping contrast against stat-card surfaces.

P2. cv-field error text is slightly under AA in light theme

On /guide/playground.html, the invalid cv-field error text Route is not available in the visible profile. renders as rgb(230 52 43) on white, producing 4.29:1. The text is small (12px), so it requires 4.5:1.

Likely source:

  • packages/uikit/src/components/cv-field.ts defaults [part='error'] to --cv-field-error-color, var(--cv-color-danger, #ff6b6b) at lines 92-94.
  • packages/uikit/src/theme/tokens.css light theme sets --cv-palette-danger / --cv-color-danger at lines 489 and 566.

Recommended fix: treat error text as a text role, not as the raw danger accent. Add or reuse a light-theme danger text token and make cv-field default --cv-field-error-color resolve to that text-safe token, or use --cv-color-danger-dark for the field error fallback.

Page Matrix

Issues are deduplicated rendered text nodes from the browser audit, not separate root causes.

URLStatusIssuesCategories
/2000-
/guide/architecture.html2003footer links
/guide/getting-started.html2004footer links, code highlighting
/guide/playground.html2003footer links, field error text
/guide/theming.html2008footer links, code highlighting
/components/2003footer links, catalog code label
/components/accordion.html20019footer links, code highlighting
/components/alert.html2003footer links
/components/badge.html2003footer links
/components/bottom-sheet.html2003footer links
/components/breadcrumb.html2003footer links
/components/button-group.html2003footer links
/components/button.html2003footer links
/components/callout.html2003footer links
/components/card.html2003footer links
/components/carousel.html2003footer links
/components/checkbox.html2003footer links
/components/chip-group.html2003footer links
/components/chip.html2003footer links
/components/code-input.html2008footer links, code highlighting
/components/combobox.html2003footer links
/components/context-menu.html20023footer links, code highlighting
/components/copy-button.html2003footer links
/components/date-picker.html2003footer links
/components/dialog.html2003footer links
/components/disclosure.html2003footer links
/components/drawer.html2003footer links
/components/dropzone.html2003footer links
/components/empty-state.html2003footer links
/components/feed.html2003footer links
/components/field.html2003footer links
/components/fieldset.html2003footer links
/components/grid.html2003footer links
/components/guidance-anchor.html2003footer links
/components/guidance-panel.html2003footer links
/components/image-viewer.html20027footer links, code highlighting
/components/input.html2003footer links
/components/kbd.html2003footer links
/components/link.html2003footer links
/components/listbox.html2003footer links
/components/menu.html2009footer links, code highlighting
/components/meter.html2003footer links
/components/number.html2003footer links
/components/operation-queue.html2003footer links
/components/option.html2003footer links
/components/pagination.html2003footer links
/components/popover.html2003footer links
/components/progress-ring.html2003footer links
/components/progress.html2003footer links
/components/qr-code.html20019footer links, code highlighting
/components/radio-group.html2003footer links
/components/select.html2003footer links
/components/shortcut.html2006footer links, code highlighting
/components/sidebar.html2003footer links
/components/skeleton.html2003footer links
/components/spinner.html2003footer links
/components/status-indicator.html2003footer links
/components/steps.html2003footer links
/components/switch.html2003footer links
/components/table.html2003footer links
/components/tabs.html2003footer links
/components/task-list.html2003footer links
/components/textarea.html2003footer links
/components/theme-palette.html20012footer links, code highlighting
/components/theme-provider.html20016footer links, code highlighting
/components/time-picker.html2003footer links
/components/toast.html2003footer links
/components/toolbar.html2003footer links
/components/tooltip.html20012footer links, code highlighting
/components/treegrid.html2003footer links
/components/treeview.html2003footer links
/components/window-splitter.html2002footer links

ChromVoid UIKit documentation