Skip to content

perf+a11y(landing): Lighthouse Tranche 2 — inlineCss + browserslist + a11y 84→100 + video captions#302

Merged
ignromanov merged 7 commits into
developfrom
perf/lh-tranche2
Jun 6, 2026
Merged

perf+a11y(landing): Lighthouse Tranche 2 — inlineCss + browserslist + a11y 84→100 + video captions#302
ignromanov merged 7 commits into
developfrom
perf/lh-tranche2

Conversation

@ignromanov
Copy link
Copy Markdown
Owner

Summary

Lighthouse Tranche 2 on the landing (mobile). Two tracks: performance (render-blocking + bundle) and accessibility (4 audits → 0), plus video captions for indexability/a11y.

Measured (official PSI, 3× median, mobile preview):

Before After
Perf score 76 (develop) / 81 (prod) 88
A11y score 84 100
Render-blocking stylesheets 3 0
TBT 64ms

LCP stays ~3.75s (noisy, flat to prod) — the score lift comes from eliminating render-blocking CSS, not LCP. Remaining LCP gap → Tranche 3 (chunk 8029/web3icons splitChunks).

Changes

  • perf: experimental.inlineCss: true (3 render-blocking CSS files → inline <style>, hits all pages)
  • perf: modern browserslist (chrome 111/safari 16.4/firefox 128/edge 111) → drops SWC polyfills from chunk 5028
  • a11y: aria-label on nav /history + /create + WalletButton placeholder (link-name + button-name); <a><button> nesting fixed via Button asChild
  • a11y: role="img" on NetworkIcon spans (aria-prohibited-attr)
  • a11y: ComparisonTable caption contrast zinc-500→zinc-400 (3.6:1 → 5.4:1); removed superfluous "Silent by design" figcaption
  • content: video VTT track (16 cues, from Remotion scene source) + <details> DOM transcript

Gate

Iris pass — lint/type clean, 2841/2843 tests (2 skipped), v3 mobile a11y review confirmed all 7 fixes. Coverage flake on BelowFoldSections is pre-existing (commit 244c7a4 on develop), not this branch.

Follow-ups (Tranche 3 / not blockers)

  • Chunk 8029 (web3icons + co-bundled Radix mergeRefs, ~27KB) → splitChunks.cacheGroups to push perf to 90+
  • Transcript + below-fold are client-only rendered (lazy) → SSR for full SEO/LLM indexability
  • <track> hardcoded to 9x16 VTT (both aspect ratios share it)
  • VideoSection desktop-autoplay coverage (AI#297)

Refs: AI#297

Enables Next.js experimental.inlineCss so the 3 stylesheet requests that
blocked the first render (global Tailwind 21.5KB + 2 component chunks
2.1/2.4KB) are merged into a single <style> tag in <head>.

PSI target: #2 render-blocking-resources, ~600ms LCP+FCP savings.
CSP already allows unsafe-inline for style-src — no CSP change needed.

Build evidence: index.html head now contains
  <style data-precedence="next" data-href="531c... b063... 67c5...">
with full Tailwind + component CSS inlined. Zero <link rel="stylesheet">
blocking tags remain.
Targets chrome 111, safari 16.4, firefox 128, edge 111 — all ES2022-class,
matching the Telegram/Meta/X WebViews from spec 073 IAB gate.

Without an explicit browserslist Next.js ships SWC polyfills (Object.assign,
Object.fromEntries, globalThis shims etc.). These four targets already
support all ES2022 features natively so SWC emits no polyfill helpers.

PSI target: #3 legacy JS, ~12KB gzip / ~150ms savings off chunk 5028.
Verified: `npx browserslist` resolves to exactly {chrome 111, edge 111,
firefox 128, safari 16.4}.
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 5, 2026

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

Project Deployment Actions Updated (UTC)
voidpay Ready Ready Preview, Comment Jun 5, 2026 9:16pm

@ignromanov ignromanov merged commit d1a255f into develop Jun 6, 2026
7 checks passed
@ignromanov ignromanov deleted the perf/lh-tranche2 branch June 6, 2026 00:41
ignromanov added a commit that referenced this pull request Jun 6, 2026
Remove the `default` attribute from the captions <track> in VideoSection.
The track stays present (accessible via native controls on mobile /
reduced-motion) and the server-rendered transcript <details> remains for
a11y/SEO, but captions no longer auto-render over the muted autoplay demo
video on first paint.

Follow-up to #302 which added the VTT track. Test-safe: VideoSection.test
asserts the track exists with kind/srclang/src but not `default` (26 pass).
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