From 1bef9b2e0642855b49a63ff806b8cfdfdf1b9b37 Mon Sep 17 00:00:00 2001 From: githubflyideas <36397539+githubflyideas@users.noreply.github.com> Date: Thu, 12 Nov 2026 23:46:59 +0900 Subject: [PATCH] Fix WCAG 2.1 AA issues --- branding_test.go | 4 +- static/index.html | 93 ++++++++++++++++++++++++++++++++++++++--------- static/login.html | 37 ++++++++++--------- 3 files changed, 96 insertions(+), 38 deletions(-) diff --git a/branding_test.go b/branding_test.go index 1c64369..5eb6119 100644 --- a/branding_test.go +++ b/branding_test.go @@ -79,7 +79,7 @@ func TestEmbeddedWebBranding(t *testing.T) { }{ {"/", []string{ "vrf-ping — link quality oscilloscope", - `
vrf-ping `, + `

vrf-ping `, "LIKE VRF-PING?", "vrf-ping — a single-binary link quality oscilloscope.", "vrf-ping — modern SmokePing alternative", @@ -89,7 +89,7 @@ func TestEmbeddedWebBranding(t *testing.T) { }}, {"/login", []string{ "Sign in — vrf-ping", - `
vrf-ping ●
`, + `

vrf-ping

`, "Sign in to vrf-ping", }}, } { diff --git a/static/index.html b/static/index.html index 962fb0b..c6b054b 100644 --- a/static/index.html +++ b/static/index.html @@ -9,8 +9,8 @@ /* Terminal — a trading-desk screen at 2am. Amber trace (the classic financial- terminal color) over a slate-blue cloud that sinks to navy at the edges. */ :root { - --bg:#0e1013; --panel:#171a1f; --screen:#0a0c0e; --line:#2a2f37; - --phos:#f0a838; --amber:#e8c468; --alert:#ef4a5a; --ink:#c4cad2; --dim:#747f8a; + --bg:#0e1013; --panel:#171a1f; --screen:#0a0c0e; --line:#2a2f37; --ctl:#636870; + --phos:#f0a838; --amber:#e8c468; --alert:#ef4a5a; --ink:#c4cad2; --dim:#7a858f; --grid-axis:#323944; --grid-split:#181c22; --smoke:rgba(90,140,200,.20); --lossbar:rgba(239,74,90,.65); --glow:5; --smoke-hot:#3a5a86; --smoke-mid:#2a4166; --smoke-cool:#182838; @@ -25,8 +25,8 @@ /* Newsprint — a broadsheet market page. Near-black ink trace, cloud runs from saturated brick to the warm grey of old halftone printing. */ html[data-theme="newsprint"] { - --bg:#efe9dc; --panel:#f8f4ea; --screen:#fdfbf5; --line:#d8cfb8; - --phos:#1a1a18; --amber:#9c3b2e; --alert:#b8241f; --ink:#3d3a33; --dim:#8c8672; + --bg:#efe9dc; --panel:#f8f4ea; --screen:#fdfbf5; --line:#d8cfb8; --ctl:#898374; + --phos:#1a1a18; --amber:#973a2d; --alert:#b8241f; --ink:#3d3a33; --dim:#6c6858; --grid-axis:#c9bfa4; --grid-split:#e5ddc9; --smoke:rgba(156,59,46,.22); --lossbar:rgba(184,36,31,.55); --glow:0; --smoke-hot:#c85a3e; --smoke-mid:#d69878; --smoke-cool:#ddd0bc; @@ -36,8 +36,8 @@ /* Ukiyo — Hokusai's indigo woodblock prints. Deep aizuri trace on washi paper, the cloud runs from Prussian blue to a pale moss highlight. */ html[data-theme="ukiyo"] { - --bg:#eef0e6; --panel:#f7f8f0; --screen:#fdfdf7; --line:#d4d8c4; - --phos:#1b3a6b; --amber:#c17817; --alert:#c1362f; --ink:#324158; --dim:#8593a0; + --bg:#eef0e6; --panel:#f7f8f0; --screen:#fdfdf7; --line:#d4d8c4; --ctl:#80898c; + --phos:#1b3a6b; --amber:#825110; --alert:#c1362f; --ink:#324158; --dim:#5f6d7a; --grid-axis:#c3cab0; --grid-split:#e2e4d4; --smoke:rgba(27,58,107,.22); --lossbar:rgba(193,54,47,.5); --glow:0; --smoke-hot:#4a76ae; --smoke-mid:#88a8cc; --smoke-cool:#d4dcc4; @@ -47,8 +47,8 @@ /* Memphis — Ettore Sottsass's 1980s Milan collective. Coral trace with real confidence against soft lavender-grey, teal cloud instead of the expected pink. */ html[data-theme="memphis"] { - --bg:#e8e4ec; --panel:#f5f2f8; --screen:#fbf9fc; --line:#d2c8dc; - --phos:#e3462f; --amber:#0e9488; --alert:#c1362f; --ink:#463b4f; --dim:#8f849a; + --bg:#e8e4ec; --panel:#f5f2f8; --screen:#fbf9fc; --line:#d2c8dc; --ctl:#887d91; + --phos:#bf2f1a; --amber:#096159; --alert:#ba342d; --ink:#463b4f; --dim:#6c6177; --grid-axis:#c9bcd4; --grid-split:#e9e2ee; --smoke:rgba(14,148,136,.24); --lossbar:rgba(193,54,47,.5); --glow:0; --smoke-hot:#054841; --smoke-mid:#1fa89a; --smoke-cool:#c4e2da; @@ -58,8 +58,8 @@ /* Phosphor — classic P1 green CRT, the mirror image of an amber tube: green trace, the cloud a warm amber-to-rust decay instead of the usual green fade. */ html[data-theme="phosphor"] { - --bg:#0a0f0a; --panel:#131a12; --screen:#070b06; --line:#233024; - --phos:#5eeb8a; --amber:#8ff0ab; --alert:#ff5f4a; --ink:#b8ceb8; --dim:#6f8570; + --bg:#0a0f0a; --panel:#131a12; --screen:#070b06; --line:#233024; --ctl:#5c6c5c; + --phos:#5eeb8a; --amber:#8ff0ab; --alert:#ff5f4a; --ink:#b8ceb8; --dim:#718872; --grid-axis:#2c3c2c; --grid-split:#141c14; --smoke:rgba(230,150,50,.20); --lossbar:rgba(255,95,74,.6); --glow:6; --smoke-hot:#c47a20; --smoke-mid:#8a5010; --smoke-cool:#3a2c10; @@ -138,24 +138,43 @@ .share-links { display:flex; gap:12px; } .share-links a { color:var(--dim); font-weight:500; } #routingEditor summary { cursor:pointer; } - #routingEditor input { max-width:100%; padding:7px; background:var(--screen); color:var(--ink); border:1px solid var(--line); border-radius:4px; font:inherit; } + #routingEditor input { max-width:100%; padding:7px; background:var(--screen); color:var(--ink); border:1px solid var(--ctl); border-radius:4px; font:inherit; } #routingEditor button:disabled { opacity:.5; cursor:default; } .led.error { background:var(--amber); box-shadow:none; border-radius:0; } #cfgHealth { border-color:var(--alert); margin-bottom:14px; color:var(--ink); } #cfgHealth b { color:var(--alert); } #cfgHealth ul { margin:6px 0 0; padding-left:18px; font-family:var(--mono); font-size:var(--fs-small); } #cfgHealth p { margin:6px 0 0; color:var(--dim); font-size:var(--fs-small); } + /* Accessibility. --ctl is the border of a form control: --line is a hairline + between panels (decoration), but a text field is only recognisable by its edge, + which WCAG 1.4.11 wants at 3:1. Focus rings use the accent for the same reason. */ + :focus-visible { outline:2px solid var(--phos); outline-offset:2px; } + .skip { position:absolute; left:12px; top:-60px; z-index:20; background:var(--panel); color:var(--phos); + border:2px solid var(--phos); border-radius:6px; padding:8px 14px; font-weight:600; text-decoration:none; } + .skip:focus { top:12px; } + .sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; + clip:rect(0 0 0 0); white-space:nowrap; border:0; } + h1.mark { margin:0; } + #main:focus { outline:none; } + .rng { flex-wrap:wrap; max-width:100%; } + .rng.custom { border-color:var(--ctl); } + .rng.custom input { min-width:0; max-width:100%; } + .promo-b a, .share a, .share-links a { display:inline-flex; align-items:center; min-height:24px; min-width:24px; justify-content:center; } + .share .promo-b, .share-links { flex-wrap:wrap; } + #routingEditor summary { min-height:24px; display:list-item; } +
-
vrf-ping
+

vrf-ping

One binary. One graph. One metric: Latency.
+
+ +