Skip to content

polish: a11y, performance, PWA, SEO, UX states - #16

Merged
snackman merged 4 commits into
mainfrom
polish
Jun 6, 2026
Merged

polish: a11y, performance, PWA, SEO, UX states#16
snackman merged 4 commits into
mainfrom
polish

Conversation

@snackman

@snackman snackman commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Quality polish pass — presentational/quality only. No business logic, auth, payments, realtime, RLS, security headers, or data-model changes. Build + 160 Vitest tests stay green with zero env vars.

Highlights

Accessibility (WCAG AA)

  • Skip-to-content link + id="main-content" landmark on every surface (incl. login/forbidden/track).
  • New shared accessible Dialog (focus-trap, Esc, scroll-lock, focus restore) applied to all 5 modals (pizza builder, terminal cart, customer cart, staff switch, payment).
  • KDS aria-live announcements for new tickets; per-order aria-labels on Bump/Recall/Print and ticket cards.
  • Visible :focus-visible rings (Button + global native elements); labelled inputs/buttons; aria-current/aria-pressed/aria-invalid; decorative icons aria-hidden.

Performance

  • next/font (self-hosted Inter via --font-sans) — CSP-safe, builds offline.
  • Admin back-office tab panels lazy-loaded with next/dynamic + skeleton fallback (9 managers code-split out of the initial bundle).
  • React.memo on KDS TicketCard and MenuBrowse; loading skeletons across terminal/shop/KDS/admin.

PWA

  • Manifest enriched (id, lang, categories, screenshots); maskable icons + theme/background colors retained.
  • Serwist offline fallback page (/offline); dismissible install prompt; theme-color meta.

SEO / metadata

  • Root + per-route metadata, OG + Twitter cards for home + storefront, favicons.
  • robots.ts + sitemap.ts: storefront + home indexable, app surfaces noindex.

UX states

  • Consistent empty states + error boundaries (per-surface error.tsx, root error.tsx, not-found.tsx, global-error.tsx); action toasts (aria-live); modernized home copy.

Lighthouse (desktop preset)

Before = production (main); After = this preview.

Page Perf (before → after) A11y Best Practices SEO
/ 100 → 100 100 → 100 96 → 93* 60 → 63**
/shop/[slug] 100 → 96 100 → 100 96 → 93* 60 → 66**
/terminal (→ /login) 100 → 100 100 → 100 96 → 93* 60 → 54**

* The −3 Best-Practices delta is Vercel Live's preview-only feedback script being blocked by the app's strict CSP (a console error Lighthouse counts). It does not appear in production and actually confirms the CSP is working — the app itself ships no inline/3rd-party scripts.

** SEO is capped on previews by Vercel's automatic X-Robots-Tag: noindex header on all preview deployments (Lighthouse penalizes "blocked from indexing"). In production the new metadata/OG/robots/sitemap apply and this header is absent. Verified on the preview via curl: title templates, OG/Twitter tags, favicons, and a correct robots.txt + sitemap.xml are all present.

Verification

  • npm run build (zero env), typecheck, lint — all clean.
  • npm run test:run160/160.
  • CI: build, vitest, RLS, Vercel, and the optional Playwright E2E job all green.
  • Preview smoke-tested: /, /shop/[slug], /robots.txt, /sitemap.xml, /manifest.webmanifest, /offline, /og.png, /favicon.svg all 200; CSP header intact.

See plans/quality-polish.md for the full change list.

🤖 Generated with Claude Code

Presentational-only quality pass. No business logic, auth, payments,
realtime, RLS, or CSP changes.

- a11y: skip link + main landmarks; shared accessible Dialog (focus-trap,
  Esc, scroll-lock) applied to all 5 modals; KDS aria-live new-ticket
  announcements; labelled controls/buttons; visible focus rings; aria-current.
- perf: next/font (self-hosted Inter), lazy-loaded admin tab panels via
  next/dynamic, React.memo on KDS TicketCard + MenuBrowse, loading skeletons.
- PWA: enriched manifest (id/lang/categories/screenshots), Serwist offline
  fallback page, install prompt, theme-color meta.
- SEO: root + per-route metadata, OG/Twitter for home + storefront, favicons,
  robots.ts + sitemap.ts (storefront indexable, app surfaces noindex).
- UX: consistent empty states, error boundaries (per-surface + root + global),
  action toasts; modernized home copy.

Build + 160 Vitest tests stay green with zero env vars.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 6, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
pos Ready Ready Preview, Comment Jun 6, 2026 3:31pm

Request Review

snackman and others added 2 commits June 6, 2026 11:27
Add the #main-content landmark to the sign-in form, forbidden, platform
console, signup wizard, and order-tracking surfaces so the skip link is
focusable everywhere (fixes Lighthouse "skip links are not focusable" on the
login page). Presentational only.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@snackman
snackman marked this pull request as ready for review June 6, 2026 15:34
@snackman
snackman merged commit 371df3f into main Jun 6, 2026
6 checks passed
@snackman
snackman deleted the polish branch June 6, 2026 15:34
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