From 128d48b5ea20e4de374ab65babc92ff45dc055ec Mon Sep 17 00:00:00 2001 From: Rafael Vuijk Date: Mon, 16 Nov 2026 20:53:56 +0000 Subject: [PATCH] Accessibility basics: viewport, alt text, heading order, contrast The page template had no viewport meta, so a phone rendered the page at desktop width and scaled it down; two logo images had no alt; the sidebar's "Table of contents" was an h5 after an h3; and the current page's link, the slogan and dark-theme inline code fell below the 4.5:1 contrast WCAG AA asks of body text (2.41, 3.95 and 2.93). Now: a viewport meta, alt="" on the decorative logos (the name follows as text), an h4 styled at the h5's size, the sidebar as a labelled nav landmark with its icons hidden from screen readers, a title instead of the invalid alt on the home link, and greys of 4.54 to 6.15:1. Part of #31. Co-Authored-By: Claude Opus 5.5 --- src/content/_templates/top.html | 33 +++++++++++++++++---------------- styles.css | 6 ++++++ themes.css | 14 +++++++++++--- 3 files changed, 34 insertions(+), 19 deletions(-) diff --git a/src/content/_templates/top.html b/src/content/_templates/top.html index 709e136694..3f86a7e0ad 100644 --- a/src/content/_templates/top.html +++ b/src/content/_templates/top.html @@ -2,6 +2,7 @@ + ##page_title## @@ -25,42 +26,42 @@ - +
- +

AngouriMath

diff --git a/styles.css b/styles.css index d17f49a79a..41bc7edf4a 100644 --- a/styles.css +++ b/styles.css @@ -58,6 +58,12 @@ body { } +/* The sidebar's heading is an h4 under the h3 above it, at the size an h5 had. */ +.toc-heading { + font-size: 0.83em; + margin: 1.67em 0; +} + /* With class Phone it will only be so on mobile devices */ .phone { display: none; diff --git a/themes.css b/themes.css index 4de26e967b..44dbcd16dd 100644 --- a/themes.css +++ b/themes.css @@ -22,11 +22,15 @@ } .active-link a { - color: #A7A7A7; + color: #767676; } .active-link:hover a { - color: #A7A7A7; + color: #767676; + } + + .slogan { + color: #6E6E6E; } pre { @@ -71,7 +75,7 @@ .code { background-color: #5A5A5A; border: solid #5A5A5A; - color: darkgray; + color: #E6E6E6; } .anchor { @@ -85,6 +89,10 @@ .active-link:hover a { color: #A7A7A7; } + + .slogan { + color: #8B949E; + } pre { background-color: #1D2127;