From 0ceb98c3226ca639d817d631a6e88043bb3b4825 Mon Sep 17 00:00:00 2001 From: senke Date: Wed, 25 Mar 2026 09:53:51 +0100 Subject: [PATCH] fix(a11y): fix primary button contrast ratio + tap-target test false positives MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix --sumi-text-inverse: #13110f → #f5f0e8 (was dark-on-dark) Primary buttons now have ~4.8:1 contrast ratio (WCAG AA pass) Affects: Sign In, Register, all primary action buttons - Tap-target test: skip sr-only elements (intentionally invisible) Co-Authored-By: Claude Opus 4.6 (1M context) --- apps/web/src/index.css | 2 +- tests/e2e/audit/pixel-perfect/12-tap-targets.spec.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/web/src/index.css b/apps/web/src/index.css index 43aac0c82..a0a60de62 100644 --- a/apps/web/src/index.css +++ b/apps/web/src/index.css @@ -40,7 +40,7 @@ --sumi-text-secondary: #9e9688; --sumi-text-tertiary: #6b6560; --sumi-text-disabled: #3d3930; - --sumi-text-inverse: #13110f; + --sumi-text-inverse: #f5f0e8; --sumi-text-link: #b83a1e; /* ═══ PIGMENTS — Shu vermillion (朱) + Kin gold (金) ═══ */ diff --git a/tests/e2e/audit/pixel-perfect/12-tap-targets.spec.ts b/tests/e2e/audit/pixel-perfect/12-tap-targets.spec.ts index 8255c119d..669ee874b 100644 --- a/tests/e2e/audit/pixel-perfect/12-tap-targets.spec.ts +++ b/tests/e2e/audit/pixel-perfect/12-tap-targets.spec.ts @@ -17,6 +17,9 @@ test.describe('TAP TARGETS — Chaque élément cliquable fait au moins 44×44px if (rect.width === 0 || rect.height === 0) return; const style = getComputedStyle(el); if (style.display === 'none' || style.visibility === 'hidden') return; + // Skip screen-reader-only elements (intentionally invisible) + if (style.position === 'absolute' && style.overflow === 'hidden' && (rect.width <= 1 || rect.height <= 1)) return; + if (el.classList.contains('sr-only')) return; // Skip éléments hors viewport if (rect.bottom < 0 || rect.top > window.innerHeight) return;