feat(frontend): comprehensive WCAG 2.1 AA accessibility improvements#356
Open
Richardkingz2019 wants to merge 1 commit into
Open
feat(frontend): comprehensive WCAG 2.1 AA accessibility improvements#356Richardkingz2019 wants to merge 1 commit into
Richardkingz2019 wants to merge 1 commit into
Conversation
- Add accessibility statement page (/accessibility) with conformance status, features list, known limitations, contact info & assessment approach - Add axe-core/Playwright E2E a11y audit suite covering 12 key pages - Add test-a11y CI job for automated WCAG 2.1 AA compliance checks - Add WCAG-compliant focus management with :focus-visible outlines - Add prefers-reduced-motion support and .reduce-motion class - Add high-contrast mode, color blindness filters (protanopia, deuteranopia, tritanopia), and simplified UI mode for cognitive accessibility - Add keyboard navigation mode with visible focus indicators - Add ARIA landmarks, labels, roles across Admin layout, sidebar, header, ErrorBoundary, and LoadingFallback components - Add skip-to-content links for admin and root layouts - Add accessible footer with accessibility statement & issue report links to root layout - Extend Tailwind config with WCAG color palette, responsive type scale, and touch-friendly minimum target sizes (2.75rem / 44px) - Add default testnet Stellar receiver address for local dev / CI - Add @axe-core/playwright dev dependency Closes AetherEdu#271
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR delivers a comprehensive suite of WCAG 2.1 AA accessibility (a11y) improvements across the AetherMint frontend, establishing a strong foundation for inclusive design. Every change is auditable via the new axe-core E2E test suite and enforced through a dedicated CI job.
Summary of Changes
1. New: Accessibility Statement Page (
/accessibility)A fully accessible, WCAG-compliant public-facing statement page that communicates our commitment and conformance status:
2. New: Automated A11y E2E Test Suite (
e2e/accessibility.spec.ts)main,navigation,banner), image alt text, button accessible names3. New: CI Job —
test-a11y(.github/workflows/ci.yml)build-frontendin parallel with existing E2E testsaccessibility.spec.tsa11y-test-reportartifact (retained 7 days)4. CSS/Design System: Accessibility Modes (
frontend/src/app/globals.css):focus-visiblewith 3px blue ring + offset;:focus:not(:focus-visible)removes mouse-only outlinesprefers-reduced-motionmedia query +.reduce-motionclass override.high-contrastclass forces black-on-white with underlined links and visible borders.colorblind-protanopia,.colorblind-deuteranopia,.colorblind-tritanopiaSVG filter classes.simplified-uihides decorative elements and disables animations.keyboard-nav-enabledforces thick outlines on all focused elements.visual-indicators-enabledadds glow to focus-visible on interactive elements5. Tailwind Config Extension (
tailwind.config.js)primary-50toprimary-950) ensuring 4.5:1 minimum contrastdisplay,h1–h3,body,body-smwith proper line heightstouch: 2.75rem(44px, WCAG 2.5.5)6. Component Accessibility Upgrades
AdminSidebar.tsxrole="navigation"witharia-labelledbypointing to sidebar title<ul role="list">/<li role="listitem">aria-expandedon collapsible items,aria-current="page"for active itemaria-labelon collapse/expand toggle buttonaria-hidden="true"AdminHeader.tsxaria-labelandaria-expandedon notification bell and user menu buttonsaria-haspopup="true"on dropdown triggersrole="list"/role="listitem"witharia-labelledbyaria-hidden="true", input has<label htmlFor>+sr-onlylabelAdminLayout.tsx(admin/layout.tsx)<html>/<body>wrapper (handled by root layout)#admin-main-content)<aside role="navigation">wrapping sidebar<header role="banner">wrapping admin header<main id="admin-main-content" role="main" tabIndex={-1}>for focus managementErrorBoundary.tsxrole="alert"andaria-live="assertive"aria-hidden="true"id="error-boundary-title"<summary>has visible focus ring<pre>block is keyboard-focusable (tabIndex={0})aria-label="Try again"LoadingFallback.tsx/LoadingSpinnerrole="status"andaria-live="polite"for dynamic content announcementsaria-labelset to loading message<span className="sr-only">for screen readersaria-hidden="true"7. Root Layout (
layout.tsx)role="contentinfo"andaria-label="Site footer"/accessibility)rel="noopener noreferrer")8. Configuration & Dependencies
next.config.js: Added default Stellar testnet receiver address for local dev/CI environmentspackage.json: Added@axe-core/playwrightdev dependencyFiles Changed
.github/workflows/ci.ymlfrontend/e2e/accessibility.spec.tsfrontend/next.config.jsfrontend/package.jsonfrontend/src/app/accessibility/page.tsxfrontend/src/app/admin/layout.tsxfrontend/src/app/globals.cssfrontend/src/app/layout.tsxfrontend/src/components/Admin/AdminHeader.tsxfrontend/src/components/Admin/AdminSidebar.tsxfrontend/src/components/ErrorBoundary.tsxfrontend/src/components/LoadingFallback.tsxfrontend/tailwind.config.jspackage-lock.jsonTotal: 14 files, +766 / −65 lines
Type of Change
Testing
Automated
main,navigation,bannerrole presenceCI Pipeline
test-a11yjob runs on every PR pushManual Validation Checklist
Checklist
aria-hidden="true"