Skip to content

fix(web): lift the Lighthouse accessibility score to 100 - #515

Merged
gitfromwildan merged 2 commits into
mainfrom
fix/web-accessibility-contrast
Nov 9, 2026
Merged

gitfromwildan merged 2 commits into
mainfrom
fix/web-accessibility-contrast

Conversation

@gitfromwildan

Copy link
Copy Markdown
Member

Summary

PageSpeed scored the home page 86 on accessibility (report). This brings /, /features and /plugins to 100 (desktop and mobile, Lighthouse 12 locally with the PageSpeed desktop preset).

Findings and fixes

  • color-contrast (most of the report). muted darkens to #64655d and dark-muted lightens to #a0a89a. The accent #348fea stays the brand color for icons, rules and decoration, but small text and the primary button now use two derived cuts: accent-ink (accent mixed 30% toward black, for light surfaces and the primary button) and dark-accent (accent mixed 25% toward white, for text on dark cards and the lit search row). Both are color-mix() off --color-accent, so the theme swatches on the home page still recolor them.
  • TechnicalLabel gains a dark-accent tone, used by the dark SectionIntro and the highlighted feature card; accent now maps to accent-ink.
  • Markdown demo: callout title in accent-ink, callout body mixed toward ink instead of transparent, "✓ built" in a new ok-ink green.
  • heading-order: the demo document renders its title as h2 and sections as h3, following the hero h1.
  • aria-allowed-role / aria-required-children / listitem: the copy button moves out of role="tablist", and each panel is a <div role="tabpanel"> with id/aria-controls/aria-labelledby wrapping the <ol>.
  • Small accent text on the plugins page (package names, "RENDERED WITH TAKUMI", "ASK AI", the <mark> highlight) uses dark-accent; "DocuBook" in the OG card and the active navbar link use accent-ink.

Verification

Page Before After
/ desktop 86 100
/ mobile – 100
/features – 100
/plugins 96 after the first pass 100

astro sync && tsc --noEmit, oxlint, prettier and pnpm test in pages/ pass. Visually the primary button is a slightly deeper blue; nothing else is noticeable.

Small text on the marketing pages sat below WCAG AA contrast and the
quickstart tabs mixed foreign children into the tablist. The muted greys
move a step toward the surface, text on the accent gets a deep cut for
light surfaces and a light cut for dark ones (both derived from the
accent so the theme swatches still recolor them), the demo callout and
"built" badge use readable colors, the demo document's headings follow
the hero's h1, and the copy button leaves the tablist while each panel
gets a proper tabpanel wrapper.

Lighthouse accessibility: 86 -> 100 on /, /features and /plugins.
@vercel

vercel Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docu Ignored Ignored Preview Nov 9, 2026 5:02pm UTC

@gitfromwildan gitfromwildan self-assigned this Nov 9, 2026
pullfrog[bot]
pullfrog Bot previously approved these changes Nov 9, 2026

@pullfrog pullfrog Bot left a comment

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.

✅ No new issues found.

Mode: standard. Verdict: READY. No DRY, refactor or bug findings.

Reviewed changes

I reviewed the palette token changes, the TechnicalLabel tone split, the call-site swaps and the Quickstart tab and heading fixes on the private pages/ site.

  • Contrast tokens: --color-accent-ink and --color-dark-accent are color-mix() cuts of --color-accent, and the muted greys are adjusted. I recomputed the ratios for the default accent and every small-text pairing clears 4.5:1 (accent-ink 5.51 on paper and 6.11 under white, dark-accent 6.14 on dark-card and 4.76 on the lit search row, dark-muted 4.71 on the lit row).
  • Swatch compatibility: DevFeatures.astro and Site.astro set --color-accent on document.documentElement, which is the same element that carries the @theme variables, so the derived tokens still follow the theme swatches.
  • TechnicalLabel tone remap: accent now resolves to text-accent-ink. The remaining tone="accent" callers (PageIntro, RuntimeStrip, OpenSource, PluginFlow) all sit on light surfaces. The dark ones (SectionIntro with tone="dark" and the highlighted FeatureGrid card) moved to dark-accent.
  • Quickstart ARIA: the copy button moved out of role="tablist", and each panel is now a <div role="tabpanel"> with aria-labelledby/aria-controls pairs. The tab script still selects panels by [data-panel], so switching tabs and copying both keep working.
  • Playground headings and callout: the demo document now uses h2/h3 after the hero h1. The demo source only uses the info callout, so mixing the body toward --color-ink affects only the variant that is actually shown.

ℹ️ Non-default theme presets still fall below AA

The fixed 30% black and 25% white mixes are tuned for the default blue. With the persisted freshlime preset, accent-ink is 3.79:1 on paper and 4.2:1 behind the primary button's white text. With coffee, dark-accent is 3.62:1 on the lit search row. These are better than before the PR and don't affect Lighthouse, which uses the default accent, so nothing here blocks merging. It's a design choice whether the swatch demo should guarantee AA too.

A small accuracy note: the global.css comment gives 6.5:1 for dark-accent on dark-card. My calculation gives about 6.1:1.

Pullfrog  | View workflow run | Using claude-opus-5-5 | 𝕏

The accent text cuts were tuned for the default blue only: the freshlime
preset left accent-ink at 3.8:1 on paper and coffee left dark-accent at
3.6:1 on the lit search row. Mixing 45% black into accent-ink and 40%
white into dark-accent keeps every preset at or above 4.5:1 on each
surface the tokens are used on, and the comments now carry the measured
ratios (the dark-card figure was 6.1:1, not 6.5:1).
@gitfromwildan

Copy link
Copy Markdown
Member Author

Follow-up in 309d060: the accent text mixes now clear 4.5:1 under all three theme presets (accent-ink 55% accent / 45% black, dark-accent 60% accent / 40% white), and the comment in global.css carries the measured ratios, including the 6.1:1 dark-card figure. Lighthouse accessibility is still 100 on /, /features and /plugins against the rebuilt site.

@pullfrog pullfrog Bot left a comment

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.

✅ No new issues found.

Mode: standard. Verdict: READY. No DRY, refactor or bug findings.

Reviewed changes

Since the last review, the derived accent cuts in global.css were retuned so they pass AA under every theme preset, not just the default blue. This closes the informational note from the previous review.

  • accent-ink deepened: now 55% accent mixed with black (was 70%). I recomputed the contrast. The worst case is freshlime at 5.59:1 on paper and 6.20:1 under the primary button's white text. The default blue is 7.65:1 and 8.49:1. These match the new comment.
  • dark-accent lightened: now 60% accent mixed with white (was 75%). The worst case is coffee at 4.72:1 on the lit search row (#353b2f) and 6.10:1 on dark-card. The default blue is 5.76:1 and 7.43:1. These also match the comment, and the earlier "6.5:1" mismatch is gone.
  • Knock-on to the playground callout: the darker accent-ink also darkens the 16% tint behind it. The title still clears 4.89:1 on the tint with freshlime, and the body clears 6.30:1.

Pullfrog  | View workflow run | Using claude-opus-5-5 | 𝕏

@gitfromwildan
gitfromwildan merged commit 2c70c57 into main Nov 9, 2026
15 checks passed
@gitfromwildan
gitfromwildan deleted the fix/web-accessibility-contrast branch November 9, 2026 17:05
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.

1 participant