Repository navigation
test(case): measure sampled live text contrast without claiming WCAG conformance - #202
Conversation
andy-zen-dev
left a comment
There was a problem hiding this comment.
Independent exact-head review — 92ef902746ce198dc28596e6328daf2070f7029d (base 41264b980d2adead709195d5579079a046ed2720).
Reviewed the six-file diff, pure contrast calculations, nine offline regressions, browser sampling path, case-study text, AGENTS.md / CONTRIBUTING.md, #82, prior merged keyboard probe, and current CI evidence. The ratio uses WCAG relative luminance and compares before rounding; normal and large-text thresholds are distinguished. Missing/hidden elements, transparent foreground/background, images, and ancestor opacity/blend are classified not-measurable, not silently passed. Samples are explicitly restricted to nine named text roles, two emulated themes, and a 320 CSS px viewport; the <6-measurable instrumentation gate is separate from actual contrast findings.
Exact-head quality workflow #41002303664 6/6 success, including Python 3.11/3.14/Windows, lint, and both Action self-tests. Live Chromium workflow #41002303487 success with 9/9 measurable text roles in each theme, 18/18 sampled ratios meeting the respective threshold (light 5.17–17.40:1, dark 5.47–13.97:1), no browser errors, exact saved JSON and no horizontal overflow. The job log confirms the nine offline Node tests completed successfully. Pinned-source workflow #41002303526 success. No local tests or independent screenshot inspection performed by this reviewer; commit-status API reported no additional statuses.
APPROVE for the scoped computed-style diagnostic and carefully qualified case-study evidence. This is not a whole-page WCAG AA certification, screen-reader or real 400% zoom test, proof of deployed JS/HTML revision, or closure of #82. Head rechecked immediately before submission.
Reader value
The existing trade_simulation case has visual and keyboard observations, but its small provenance/units/footer text had no measured contrast evidence. This adds a conservative, reusable computed-style contrast metric and runs it on nine visible text roles in light and dark at 320 CSS px.
Scope
case-studies/contrast-metrics.mjscalculation using W3C WCAG 2.2 SC 1.4.3 thresholds; unsupported alpha, gradients, ancestor opacity/blending and hidden text remain NOT MEASURABLE.Acceptance
Related: #82. BR-A11Y-009 follow-up (existing registered accessibility unit).