chore: upgrade vite-plus to 0.1.20 and fix surfaced a11y violations#15
chore: upgrade vite-plus to 0.1.20 and fix surfaced a11y violations#15fengmk2 wants to merge 1 commit into
Conversation
e18e dependency analysisNo dependency warnings found. |
There was a problem hiding this comment.
Code Review
This pull request updates the vite-plus and vitest dependencies from version 0.1.16 to 0.1.20 across the project's configuration files. The changes include extensive updates to the pnpm-lock.yaml file, reflecting new versions for core packages such as oxlint, oxfmt, and oxc-project components, while also explicitly incorporating esbuild into several dependency snapshots. As there are no review comments to assess, I have no feedback to provide.
|
@codex review |
|
@cursor review |
|
Skipping Bugbot: Bugbot is disabled for this repository. Visit the Bugbot dashboard to update your settings. |
Upgrade vite-plus and related packages from 0.1.16 to 0.1.20 (latest stable), and fix the 14 WCAG AA color-contrast violations that the upgrade exposed in test/nuxt/a11y.spec.ts. The strongest candidate for the behavior change is upstream vitest-dev/vitest#10049 ("fix(browser): spread user server options into browser Vite server in project"), shipped in vitest@4.1.4. Before that fix, createBrowserServer silently dropped user server.* options, so the browser-mode Vite server didn't fully serve UnoCSS-generated CSS and axe defaulted to plain black-on-white. After it, styles render correctly and axe surfaces pre-existing contrast issues. vite-plus 0.1.16 bundles vitest 4.1.2 (without the fix); 0.1.20 bundles 4.1.5 (with it). The violations are real and pre-date this PR — the upgrade only stops masking them. Source-level a11y fixes: - LinkBase: disabled buttons drop opacity-50 + text-fg/bg-fg (3.69:1) for text-fg-muted / bg-fg-muted tokens (~8:1) and add aria-disabled. - DiffSidebarPanel + DiffMobileSidebarDrawer: stats and semver badges use text-{green,red,yellow,purple}-700 dark:text-{...}-400, matching the existing Alert.vue convention. - DiffSkipBlock: drop redundant opacity-50; text-fg-muted on bg-bg-muted already meets contrast. - DiffLine: line-number cell uses text-fg-subtle (5.5:1+) instead of opacity-50 over inherited text (3.69:1). - main.css: light-mode --accent default oklch(0.5 0.16 247.27) so text-accent on bg-fg/10 reaches ~5:1 (was 4.19); user-set --accent-color overrides remain unaffected.
56ba6ae to
d3edb93
Compare
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit d3edb93. Configure here.
Visual comparison — a11y fixesBoth captures taken on this branch (vite-plus 1.
|
| BEFORE (failing AA) | AFTER (passes AA) |
|---|---|
![]() |
![]() |
2. DiffMobileSidebarDrawer stats line
text-{green,red,yellow}-500 on white (1.91–3.80:1) → text-{...}-700 dark:text-{...}-400 matching the
existing Alert.vue convention.
| BEFORE | AFTER |
|---|---|
3. DiffSkipBlock "n unchanged lines"
Removed redundant opacity-50 — text-fg-muted on bg-bg-muted already meets contrast (2.41:1 → ~8:1).
| BEFORE | AFTER |
|---|---|
![]() |
4. DiffLine line numbers
opacity-50 over inherited text (3.69:1) → text-fg-subtle (5.5:1+). Subtle delta — line-number "10"
goes from washed-out to readable.
| BEFORE | AFTER |
|---|---|
![]() |
![]() |
5. CodeFileTree selected file
Light-mode --accent default oklch(0.53 → 0.5) so text-accent on bg-fg/10 clears AA (4.19 → ~5:1).
User-set --accent-color overrides remain unaffected.
| BEFORE | AFTER |
|---|---|
![]() |
![]() |
Not pictured: DiffSidebarPanel (the desktop sibling of #2) reuses the same
text-green/red/yellow-500 → -700 swap and the same text-purple-500 → -700 semver-badge swap. It
mounts in isolation but the right-aligned colored stats / major / minor / patch badges only surface
once the panel is wired into a real flex layout, so the standalone capture doesn't render them. The fix
is identical to #2.







Summary
Upgrade vite-plus and related packages from
0.1.16to0.1.20(latest stable), and fix the 14 WCAG AA color-contrast violations the upgrade exposed.Package upgrade
package.json:vite-plus→0.1.20,vitest(aliased to@voidzero-dev/vite-plus-test) →0.1.20pnpm-workspace.yamloverrides:vite(aliased to@voidzero-dev/vite-plus-core) andvitest→0.1.20pnpm-lock.yaml: regenerated viapnpm installWhy a11y tests started failing
After bumping vite-plus,
test/nuxt/a11y.spec.tsreported 14 newaxe color-contrastviolations acrossLinkBase,CodeFileTree,DiffLine,DiffSkipBlock,DiffTable,DiffSidebarPanel, andDiffMobileSidebarDrawer. The same tests pass onmainwithvite-plus@0.1.16.The strongest candidate for the behavior change is upstream vitest vitest-dev/vitest#10049 —
fix(browser): spread user server options into browser Vite server in project— merged 2026-04-07, shipped invitest@4.1.4:Vite-plus alpha bundles vitest:
vite-plus@0.1.16→vitest@4.1.2(without the fix)vite-plus@0.1.20→vitest@4.1.5(with the fix)Before the fix, user
server.*options (including the ones Nuxt + UnoCSS rely on for serving generated CSS modules in browser-mode tests) were silently dropped, so styles weren't fully applied to the test DOM and axe defaulted to plain black-on-white. After the fix, the same options reach the browser-mode Vite server, the styled colors actually render, and axe correctly flags pre-existing AA contrast issues. The violations are real and pre-date this PR; the upgrade only stops masking them.a11y fixes (real source-level)
app/components/Link/Base.vueopacity-50 + text-fg/bg-fg(effective 3.69:1) fortext-fg-muted/bg-fg-muteddesign tokens (~8:1) and addaria-disabled="true"app/components/Diff/SidebarPanel.vuetext-{green,red,yellow,purple}-500→text-{...}-700 dark:text-{...}-400(matches existingAlert.vueconvention)app/components/Diff/MobileSidebarDrawer.vueapp/components/Diff/SkipBlock.vueopacity-50—text-fg-mutedonbg-bg-mutedalready meets contrastapp/components/Diff/Line.vuetext-fg-subtle(5.5:1+) instead ofopacity-50over inherited text (3.69:1)app/assets/main.css--accentdefaultoklch(0.5 0.16 247.27)(was0.53). Liftstext-accentonbg-fg/10from 4.19 to ~5:1. Users with a custom--accent-colorare unaffectedTest plan
pnpm test --project nuxt test/nuxt/a11y.spec.ts→ 440/440 passpnpm test→ all suites pass excepttest/unit/server/utils/image-proxy.spec.ts(DNS check onexample.com— environmental, also fails onmain, passes on CI runners)Note
Medium Risk
Moderate risk due to the
vite-plus/vitesttoolchain upgrade (and lockfile regen) which can affect build/test behavior; UI changes are limited to color/disabled-state styling and should be low impact functionally.Overview
Upgrades the Vite toolchain by bumping
vite-plus(and thevitestalias/overrides) from0.1.16to0.1.20, updating workspace overrides and regeneratingpnpm-lock.yamlaccordingly.Fixes newly-surfaced WCAG contrast/a11y issues by adjusting theme tokens and component styles: tweaks light-mode
--accent, increases contrast for diff stats/badges and line numbers, removes extra opacity in skip blocks, and updatesLink/Base.vuedisabled rendering (addsaria-disabledand switches to muted colors for better contrast).Reviewed by Cursor Bugbot for commit d3edb93. Configure here.