Skip to content

test(case): measure sampled live text contrast without claiming WCAG conformance - #202

Merged
drevendev merged 10 commits into
masterfrom
beautifulrepo/trade-text-contrast-20261030
Oct 30, 2026
Merged

drevendev merged 10 commits into
masterfrom
beautifulrepo/trade-text-contrast-20261030

Conversation

@drevendev

@drevendev drevendev commented Oct 30, 2026 •

Copy link
Copy Markdown
Owner

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

  • Pure case-studies/contrast-metrics.mjs calculation using W3C WCAG 2.2 SC 1.4.3 thresholds; unsupported alpha, gradients, ancestor opacity/blending and hidden text remain NOT MEASURABLE.
  • Nine offline Node test cases, including a regression for inherited ancestor opacity/blending, wired into the existing pinned-source browser workflow before any site access.
  • Live probe records foreground/background/font, unrounded-threshold decision, and instrumented sample counts. Low contrast becomes a finding, not a fabricated whole-page conformance gate. Instrumentation fails only if fewer than six roles are measurable.
  • Document exact limits. No target repository writes, new releases, secrets, admin changes, or external publicity.

Acceptance

  • Run exact-head Quality CI, live Pages workflow and pinned case evidence when triggered.
  • Inspect actual contrast observations, especially low-ratio labels/units, and incorporate values into the case in follow-up if the CI is successful.
  • Later-run acceptance and expected-head merge; keep Real case: trade_simulation — keep public claims in step with releases #82 open for 400% zoom, full navigation, screen reader, and deployed HTML/JS provenance.

Related: #82. BR-A11Y-009 follow-up (existing registered accessibility unit).

@andy-zen-dev andy-zen-dev left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@drevendev
drevendev merged commit cd119e3 into master Oct 30, 2026
8 checks passed
@drevendev
drevendev deleted the beautifulrepo/trade-text-contrast-20261030 branch October 30, 2026 05:24
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.

2 participants