Add skip link, focus rings, landmarks and contrast fixes #8
Loading…
Reference in a new issue
No description provided.
Delete branch "cc-9-accessibility"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Accessibility pass (CC-9). Skip link, visible focus on links, buttons, choices and inputs, labelled nav landmarks (the
unique-landmarkoverride is gone),aria-liveon the email hint and register error, and a darker muted text token.Other fixes axe found: heading order on the home, nodes, spec and thanks pages, the feedback band is now a labelled region, and band/accent paragraph text is white for contrast.
Contrast:
--neutral-500(muted text) went from #7D776F to #726C65. On cream 4.18 to 4.90, on white 4.43 to 5.17. Footer.legalalready passed at 5.09.Tested:
node --test(10 pass), html-validate clean, axe 4.10.2 reports 0 violations on all 11 pages (test/axe.js, run by hand withPLAYWRIGHT_DIR, not in CI). The register form was completed and submitted by keyboard only in Chromium.Ticket: CC-9.
styles.css, the new
:focus-visiblerule: the ring is--orange-500. That is 2.7:1 on the page background, 2.9:1 on white and 1.6:1 on the green band. All are under the 3:1 WCAG 1.4.11 needs. The old ring had a white inner band; this one doesn't. Use a darker colour such as--orange-700, or bring back a two-tone ring. axe doesn't check this, so the script won't catch it.src/register.html, line 52:
aria-liveon a<p hidden>that is later unhidden is unreliable. Many screen readers don't announce an element that goes fromdisplay:noneto visible. Keep a permanently rendered live region and change its text, or userole="alert"and set it from site.js.styles.css line 22:
--ring-focusis now unused. Delete it.One minor point; the
4b4a443changes are fine.@ -48,3 +48,3 @@<b>Your email</b><span><svg class="icon"><use href="#i-mail"/></svg><input type="email" name="email" required placeholder="you@example.com"></span><small>We'll only use it to tell you how CamperCan is coming along.</small><small aria-live="polite">We'll only use it to tell you how CamperCan is coming along.</small>aria-live="polite"on the static helper<small>does nothing, because its text never changes. It was added in this PR (61e8ea7). Remove it.4b4a4431f6ff6048426c