From 98efd56d173cb86cc39e520273d869ab9a83aecd Mon Sep 17 00:00:00 2001
From: Seth
Date: Mon, 28 Sep 2026 17:06:25 -0700
Subject: [PATCH] fix(site): fix accessibility issues in the docs site
Lighthouse accessibility on the 12 docs pages goes from 57-90 to 93-100.
Everything still failing comes from Pure's own CSS, which is unchanged.
- Darken body text (#777 -> #666), subheads (#888 -> #666), links
(#3b8bba -> #31739a) and the accent blue (#1f8dd6 -> #1a75b3) so they
meet 4.5:1 on every background they sit on.
- Underline links in running text, and make callout links white.
- Use the a11y-light syntax highlighting theme for code blocks.
- Wrap page content in ; give the menu toggle aria-label,
aria-controls and aria-expanded (kept in sync by ui.js).
- Make footer links at least 24px tall.
- Homepage: fix size chart and demo button contrast.
- Buttons page: darken the custom button example backgrounds.
- Forms page: label the read-only and rounded input examples.
- Tools page: move list descriptions inside their
s.
Fixes #1204
Co-Authored-By: Claude Opus 5.5 (1M context)
---
site/components/CodeBlock.js | 4 ++--
site/components/Menu.js | 2 +-
site/src/pages/buttons/index.js | 6 ++---
site/src/pages/forms/index.js | 4 ++--
site/src/pages/styles.css | 40 +++++++++++++++++++--------------
site/src/pages/tools/index.js | 6 ++---
site/src/theme/Layout.js | 4 ++--
site/static/css/main.css | 27 ++++++++++++++++------
site/static/js/ui.js | 2 ++
9 files changed, 57 insertions(+), 38 deletions(-)
diff --git a/site/components/CodeBlock.js b/site/components/CodeBlock.js
index 44fbc8cd5..ce5136533 100644
--- a/site/components/CodeBlock.js
+++ b/site/components/CodeBlock.js
@@ -1,6 +1,6 @@
import classnames from 'classnames';
import SyntaxHighlighter from 'react-syntax-highlighter';
-import { docco } from 'react-syntax-highlighter/dist/esm/styles/hljs';
+import { a11yLight } from 'react-syntax-highlighter/dist/esm/styles/hljs';
function CodeBlock({ children, language = 'html', full = false, wrap = false }) {
var fullClass = classnames({ 'is-code-full': full });
@@ -8,7 +8,7 @@ function CodeBlock({ children, language = 'html', full = false, wrap = false })
return (