Skip to content

UIKit docs dark theme contrast review

Date: 2026-07-05

Target: https://uikit.chromvoid.com

Scope: rendered text contrast in the published UIKit VitePress docs dark 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 73 URLs once each in Chromium, with vitepress-theme-appearance=dark, data-theme="dark", colorScheme=dark, and a 1440x1100 viewport. 72 URLs returned HTTP 200; /reviews/light-theme-contrast-review.html returned HTTP 404 on the published site and was not audited as a rendered docs page.

The browser scan measures computed foreground color against computed background color. After the pass, gradient-backed button findings were checked against their actual CSS gradients and excluded as false positives.

Summary

FindingSeverityAffected pagesLowest ratioRequired
Live-demo primary trigger text uses a dark surface token on dark surfacesP121.08:14.5:1
Dark Shiki comment tokens fail on the docs code-block backgroundP273.97:14.5:1

All regular docs pages, navigation, footer links, component catalog cards, and most live demos passed the rendered text-contrast pass.

Findings

P1. Live-demo primary trigger text is unreadable

Two iframe live demos render primary trigger labels with dark surface text over a dark demo surface. Both are small uppercase labels, so they require 4.5:1.

Examples:

URLTextForegroundBackgroundRatio
/components/drawer.htmlPolicyrgb(16 23 34)rgb(11 13 18)1.08:1
/components/tooltip.htmlVisible profilergb(16 23 34)rgb(11 13 18)1.08:1

Likely source:

  • packages/uikit/docs/.vitepress/theme/live-demo-examples/drawer.css lines 165-169 set .drawer-demo-drawer--settings::part(trigger) to color: var(--live-demo-surface) while keeping background: var(--live-demo-gradient-panel).
  • packages/uikit/docs/.vitepress/theme/live-demo-examples/tooltip.css lines 264-268 set .tooltip-demo-hotspot--primary to color: var(--live-demo-surface) while keeping background: var(--live-demo-gradient-primary-soft).

Recommended fix: keep the source of truth in the live-demo styles. If these triggers remain on dark surface gradients, use --live-demo-text or --live-demo-text-strong. If they should be filled primary/cyan controls, change the background to a real primary surface and pair it with --live-demo-on-cyan / --cv-color-on-primary.

P2. Dark code-block comments are below AA

Shiki comment spans using rgb(106 115 125) render on the dark docs code background rgb(9 16 25), producing 3.97:1. The text is normal-sized 14px code, so it requires 4.5:1.

Examples:

URLTextRatio
/components/accordion.html<!-- Controlled single mode (default) -->3.97:1
/components/context-menu.html// 'pointer' | 'keyboard' | 'programmatic' | null3.97:1
/components/theme-provider.html/* overrides */3.97:1

Likely source: packages/uikit/docs/.vitepress/theme/custom.css sets the dark code block background at line 16. The file has light-theme Shiki overrides at lines 2457-2470, but no matching dark-theme override for the --shiki-dark:#6A737D comment token.

Recommended fix: add a scoped dark-theme Shiki override for the comment token, for example mapping --shiki-dark:#6A737D to --cv-color-text-muted or a dedicated docs code-comment token that clears 4.5:1 on --vp-code-block-bg. Keep it in the docs theme layer instead of changing individual markdown examples.

Affected pages:

  • /components/accordion.html
  • /components/code-input.html
  • /components/context-menu.html
  • /components/image-viewer.html
  • /components/qr-code.html
  • /components/theme-provider.html
  • /components/tooltip.html

Excluded observations

The raw computed-color pass also flagged five gradient-backed CTAs because their CSS uses background gradients without a solid background-color, so the scanner fell through to the page background. These were excluded after source checks:

  • .VPButton.medium.brand at packages/uikit/docs/.vitepress/theme/custom.css lines 333-337 uses color: #041018 over a #71d7ff to #3394ca gradient. The lower endpoint contrast is 5.70:1.
  • .component-action-primary at packages/uikit/docs/.vitepress/theme/custom.css lines 872-877 uses color: #03121b over an alpha-blended #70dbff to #3c8bc0 gradient. The lower composited endpoint contrast is 4.61:1.

Affected raw-scan labels were Get Started, Start setup, Quick start, and Open playground.

Page Matrix

Issues are confirmed rendered text failures after excluding the gradient-backed CTA false positives.

URLStatusIssuesCategories
/2000-
/guide/architecture.html2000-
/guide/getting-started.html2000-
/guide/playground.html2000-
/guide/theming.html2000-
/components/2000-
/components/accordion.html2008code comments
/components/alert.html2000-
/components/badge.html2000-
/components/bottom-sheet.html2000-
/components/breadcrumb.html2000-
/components/button-group.html2000-
/components/button.html2000-
/components/callout.html2000-
/components/card.html2000-
/components/carousel.html2000-
/components/checkbox.html2000-
/components/chip-group.html2000-
/components/chip.html2000-
/components/code-input.html2004code comments
/components/combobox.html2000-
/components/context-menu.html2005code comments
/components/copy-button.html2000-
/components/date-picker.html2000-
/components/dialog.html2000-
/components/disclosure.html2000-
/components/drawer.html2001demo trigger text
/components/dropzone.html2000-
/components/empty-state.html2000-
/components/feed.html2000-
/components/field.html2000-
/components/fieldset.html2000-
/components/grid.html2000-
/components/guidance-anchor.html2000-
/components/guidance-panel.html2000-
/components/image-viewer.html2001code comments
/components/input.html2000-
/components/kbd.html2000-
/components/link.html2000-
/components/listbox.html2000-
/components/menu.html2000-
/components/meter.html2000-
/components/number.html2000-
/components/operation-queue.html2000-
/components/option.html2000-
/components/pagination.html2000-
/components/popover.html2000-
/components/progress-ring.html2000-
/components/progress.html2000-
/components/qr-code.html2006code comments
/components/radio-group.html2000-
/components/select.html2000-
/components/shortcut.html2000-
/components/sidebar.html2000-
/components/skeleton.html2000-
/components/spinner.html2000-
/components/status-indicator.html2000-
/components/steps.html2000-
/components/switch.html2000-
/components/table.html2000-
/components/tabs.html2000-
/components/task-list.html2000-
/components/textarea.html2000-
/components/theme-palette.html2000-
/components/theme-provider.html2001code comments
/components/time-picker.html2000-
/components/toast.html2000-
/components/toolbar.html2000-
/components/tooltip.html2006code comments, demo trigger text
/components/treegrid.html2000-
/components/treeview.html2000-
/components/window-splitter.html2000-
/reviews/light-theme-contrast-review.html4040unpublished on target

ChromVoid UIKit documentation