Skip to content

Accessibility basics: viewport, alt text, heading order, contrast - #62

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
accessibility-basics
Nov 16, 2026
Merged

Rafael-SOWNet merged 1 commit into
masterfrom
accessibility-basics

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Member

Part of #31, which reports an accessibility score of 67 on PageSpeed. The template every page uses had these defects:

Was Now
Viewport no <meta name="viewport">, so a phone drew the page at desktop width and scaled it down width=device-width, initial-scale=1
Logo images no alt on either alt="", since they are decorative and the name follows as text
Sidebar headings h3 AngouriMath then h5 Table of contents, skipping a level h4, styled at the size the h5 had
Sidebar a div a nav labelled Site; its icons have aria-hidden
Home link alt="…" on an <a>, which is not an attribute of a title="…"
Current page's link, light theme #A7A7A7 on white, 2.41:1 #767676, 4.54:1
Slogan inline color: gray: 3.95:1 light, 4.79:1 dark #6E6E6E light, 5.1:1; #8B949E dark, 6.15:1
Inline code, dark theme darkgray on #5A5A5A, 2.93:1 #E6E6E6, 5.53:1

The ratios are WCAG's relative-luminance contrast, computed from the colour values. AA asks 4.5:1 for body text.

Built locally and checked in a headless browser at 1400 px in both themes and at 400 px. The layout is unchanged except on a phone, where the text is now at its readable size instead of shrunk. I could not run Lighthouse itself: PageSpeed's shared quota was exhausted, so there is no new score here. The live page should be measured after the merge.

Not in this PR: a pink link on dark inline code is 4.48:1, just under 4.5, and I have not audited the pages other than the home page.

🤖 Generated with Claude Code

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 <noreply@anthropic.com>
@Rafael-SOWNet
Rafael-SOWNet merged commit 9f85659 into master Nov 16, 2026
5 of 6 checks passed
@Rafael-SOWNet
Rafael-SOWNet deleted the accessibility-basics branch November 16, 2026 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant