From 349bec0e99f330fc1172ca9847c58f019e861f61 Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Mon, 20 Jul 2026 18:29:18 -0500 Subject: fix(a11y): suppress disabled-control contrast findings on the rule MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit WCAG 1.4.3 exempts inactive components from contrast requirements, so Inspect's Run button — disabled until a domain is typed — was reporting a contrast failure that was never a real defect. The first attempt typed a domain to enable the button. That worked for the single-screen test but raised the keyboard, which then followed the audit onto every later screen in the Dynamic Type sweep and reported nine phantom hit-region findings per screen against the system emoji picker's category buttons. Suppressing on the rule instead — drop contrast findings whose element reports isEnabled == false — fixes it everywhere with no UI manipulation. Also documents that simulator keyboard state persists across runs, so a dirty simulator inflates the burndown with system-UI findings. Erase and re-run before believing anything that names system UI. --- Docs/ACCESSIBILITY.md | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'Docs') diff --git a/Docs/ACCESSIBILITY.md b/Docs/ACCESSIBILITY.md index 128bf3f..7e28d89 100644 --- a/Docs/ACCESSIBILITY.md +++ b/Docs/ACCESSIBILITY.md @@ -137,12 +137,19 @@ pre-commit that blocks every commit. A hook routinely bypassed with ## Notes -- **Disabled controls are a false positive.** WCAG 1.4.3 exempts inactive - components from contrast requirements, but the audit flags them anyway. The - Inspect screen's Run button is disabled until a domain is typed, and auditing - the empty state reported a contrast failure that was never a real defect — - which is why `testInspectScreen` types a domain before auditing. Watch for - this before "fixing" a contrast finding on a disabled control. +- **Disabled controls are a false positive, and are suppressed.** WCAG 1.4.3 + exempts inactive components from contrast requirements, but the audit flags + them anyway — Inspect's Run button is disabled until a domain is typed, and + auditing the empty state reported a contrast failure that was never a real + defect. The harness now drops contrast findings whose element reports + `isEnabled == false`. Suppressing on the rule beats driving the UI to enable + the control: typing raises the keyboard, which then follows the audit onto + later screens and flags the system emoji picker's category buttons. +- **A dirty simulator inflates the burndown.** Keyboard state persists across + runs, so a simulator left with the emoji picker open reports ~9 phantom + hit-region findings per screen. If findings appear that name system UI + ("Flags category", "Frequently Used category"), erase the simulator + (`xcrun simctl erase `) and re-run before believing them. - Audits retry up to three times. Slower machines can miss the audit's internal deadline (`Audit failed to complete in time`, code `-56`), which is a tooling timeout, not an app defect. A screen that still cannot be audited is reported -- cgit v1.2.3