From c21614020a262a29abc512f4ba0812e3a6b36a9f Mon Sep 17 00:00:00 2001 From: Santhosh Janardhanan Date: Tue, 10 Feb 2026 03:22:22 -0500 Subject: [PATCH] wcag and responsiveness --- .../2026-02-10-wcag-responsive/.openspec.yaml | 2 + .../2026-02-10-wcag-responsive/design.md | 88 ++++++++++ .../2026-02-10-wcag-responsive/proposal.md | 29 ++++ .../specs/wcag-responsive-ui/spec.md | 67 +++++++ .../2026-02-10-wcag-responsive/tasks.md | 27 +++ openspec/specs/wcag-responsive-ui/spec.md | 71 ++++++++ site/public/styles/global.css | 163 +++++++++++++++++- site/src/layouts/BaseLayout.astro | 93 +++++++++- site/tests/wcag-responsive-shell.test.ts | 37 ++++ 9 files changed, 569 insertions(+), 8 deletions(-) create mode 100644 openspec/changes/archive/2026-02-10-wcag-responsive/.openspec.yaml create mode 100644 openspec/changes/archive/2026-02-10-wcag-responsive/design.md create mode 100644 openspec/changes/archive/2026-02-10-wcag-responsive/proposal.md create mode 100644 openspec/changes/archive/2026-02-10-wcag-responsive/specs/wcag-responsive-ui/spec.md create mode 100644 openspec/changes/archive/2026-02-10-wcag-responsive/tasks.md create mode 100644 openspec/specs/wcag-responsive-ui/spec.md create mode 100644 site/tests/wcag-responsive-shell.test.ts diff --git a/openspec/changes/archive/2026-02-10-wcag-responsive/.openspec.yaml b/openspec/changes/archive/2026-02-10-wcag-responsive/.openspec.yaml new file mode 100644 index 0000000..70eb9e0 --- /dev/null +++ b/openspec/changes/archive/2026-02-10-wcag-responsive/.openspec.yaml @@ -0,0 +1,2 @@ +schema: spec-driven +created: 2026-02-10 diff --git a/openspec/changes/archive/2026-02-10-wcag-responsive/design.md b/openspec/changes/archive/2026-02-10-wcag-responsive/design.md new file mode 100644 index 0000000..b1cef10 --- /dev/null +++ b/openspec/changes/archive/2026-02-10-wcag-responsive/design.md @@ -0,0 +1,88 @@ +## Context + +- The site is an Astro-based static site with shared global styling in `site/public/styles/global.css` and shared layout/navigation in `site/src/layouts/*`. +- Current UX gaps: + - Responsive behavior is inconsistent at smaller breakpoints (navigation does not collapse into a mobile-friendly menu). + - The background gradient shows abrupt cuts/banding on larger resolutions. + - Typography relies on system fonts; a smoother, display-friendly font is desired. + - Accessibility baseline is not formally enforced; target is WCAG 2.2 AA minimum standard (not necessarily 100% compliance). + +## Goals / Non-Goals + +**Goals:** +- Establish an explicit baseline of WCAG 2.2 AA-aligned behavior for the site shell and common interactive elements. +- Implement responsive layouts across common breakpoints; ensure primary navigation collapses into a hamburger menu with mild animation. +- Ensure the mobile menu is fully keyboard accessible and screen-reader friendly (correct semantics, labeling, focus management). +- Improve background rendering so gradients do not cut abruptly on large displays. +- Introduce a display-friendly font and apply it consistently across pages and components. +- Add lightweight verification (tests and/or build checks) that ensures the baseline remains intact. + +**Non-Goals:** +- Full accessibility audit and remediation of all possible WCAG 2.2 AA items across all content (e.g., all third-party embeds, all user-provided HTML). +- Building a complete design system or replacing all visual styling. +- Implementing complex client-side routing or heavy JS frameworks. + +## Decisions + +1. Use a small client-side navigation controller for the hamburger menu +Why: Astro renders static HTML; a small, isolated script can provide toggling + focus management without adding framework complexity. +Alternatives considered: +- CSS-only checkbox hack: rejected (harder to manage focus/ARIA correctly, less robust). +- A full component framework (React/Vue): rejected (unnecessary weight). + +2. Prefer semantic HTML + minimal ARIA +Why: Better interoperability across assistive technologies and less risk of incorrect ARIA. +Approach: +- Use a ` + +