From 1258449eb333e3cee505428f13fb4fe4fe9fc41b Mon Sep 17 00:00:00 2001 From: Seth Falco Date: Fri, 27 Feb 2026 00:30:30 +0000 Subject: [PATCH] a11y: adopt pa11y wcag2aaa preset --- pa11y.mjs | 27 +++--- package.json | 2 +- .../HomepageFeatures/index.module.css | 8 +- src/components/SvgoPreview/index.module.css | 4 +- src/css/custom.css | 87 ++++++++++--------- src/pages/index.jsx | 4 +- src/pages/index.module.css | 8 +- .../DocRoot/Layout/Sidebar/styles.module.css | 4 +- src/theme/Footer/Layout/index.module.css | 5 +- 9 files changed, 83 insertions(+), 66 deletions(-) diff --git a/pa11y.mjs b/pa11y.mjs index 473841c7..1ff1d7a6 100644 --- a/pa11y.mjs +++ b/pa11y.mjs @@ -12,15 +12,19 @@ import puppeteer from 'puppeteer'; const SITEMAP_URL = 'http://localhost:3000/sitemap.xml'; const PAGE_PATTERN = /(?<=https:\/\/svgo.dev).*?(?=<)/g; -/** - * Issues that we're ignoring from our accessibility testing for now. If the - * context is a partial match for any pattern, it is ignored. - */ -const IGNORED_ISSUES = [ +const IGNORED_SELECTORS = [ // Prism code blocks. - /
-

+

SVG Optimizer for Node.js and CLI -

+

SVGO and its various integrations will enable you to optimize SVGs and serve your web applications faster. diff --git a/src/pages/index.module.css b/src/pages/index.module.css index 003b171b..05083c6c 100644 --- a/src/pages/index.module.css +++ b/src/pages/index.module.css @@ -28,10 +28,14 @@ width: 80%; border-radius: 100%; z-index: -1; - background: linear-gradient(to bottom, #e0ebf6, #39aee410); + background: linear-gradient(to bottom, + hsl(210 55% 92%), + hsl(199 76% 56% / 0.06)); @media (prefers-color-scheme: dark) { - background: linear-gradient(to bottom, #39aee440, #39aee410); + background: linear-gradient(to bottom, + hsl(199 76% 56% / 0.25), + hsl(199 76% 56% / 0.06)); } } diff --git a/src/theme/DocRoot/Layout/Sidebar/styles.module.css b/src/theme/DocRoot/Layout/Sidebar/styles.module.css index c363e52d..495a4754 100644 --- a/src/theme/DocRoot/Layout/Sidebar/styles.module.css +++ b/src/theme/DocRoot/Layout/Sidebar/styles.module.css @@ -1,6 +1,6 @@ :root { - --doc-sidebar-width: 300px; - --doc-sidebar-hidden-width: 30px; + --doc-sidebar-width: 300px !important; + --doc-sidebar-hidden-width: 30px !important; } .docSidebarContainer { diff --git a/src/theme/Footer/Layout/index.module.css b/src/theme/Footer/Layout/index.module.css index a7b62e4d..bccb097c 100644 --- a/src/theme/Footer/Layout/index.module.css +++ b/src/theme/Footer/Layout/index.module.css @@ -7,7 +7,9 @@ .wrapper { position: relative; padding: 6rem 1rem 2rem 1rem; - background: linear-gradient(to right, #0771d5, #27489f); + background: linear-gradient(90deg, + hsl(209 94% 32%), + hsl(224 61% 39%)); clip-path: url(#footerMobilePath); overflow: hidden; } @@ -38,7 +40,6 @@ @media (min-width: 997px) { .wrapper { - background: linear-gradient(to right, #0771d5, #27489f); clip-path: url(#footerDesktopPath); }