From e366ebd8cffb208dc7f3d8595882563d25fb5a63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Fri, 26 Jun 2026 14:26:14 +0200 Subject: [PATCH] test(e2e): exempt visually-hidden inputs from the 44px target sweep DateField and DateTimeField front an sr-only native date input with a formatted overlay carrying the 44px target, matching the file-upload pattern the sweep already exempts. Generalise the exemption to any visually-hidden or zero-size input. --- e2e/settings-mobile-consistency.spec.ts | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/e2e/settings-mobile-consistency.spec.ts b/e2e/settings-mobile-consistency.spec.ts index acc8ed7cc..7a40bd3c1 100644 --- a/e2e/settings-mobile-consistency.spec.ts +++ b/e2e/settings-mobile-consistency.spec.ts @@ -64,17 +64,15 @@ test.describe("Settings mobile consistency (Pixel 5)", () => { }), ) ).filter( - // The avatar profile-photo upload uses the accessible - // visually-hidden pattern: the input itself - // is sr-only / zero-size and the real 44 px touch target is the - // styled label/button that triggers it. The touch-target sweep - // must measure that visible affordance, not the hidden input, so - // exempt file inputs that are hidden or collapsed to zero size. - (inp) => - !( - inp.type === "file" && - (inp.hidden || inp.height === 0 || inp.width === 0) - ), + // Some inputs use the accessible visually-hidden pattern: the input + // itself is sr-only / zero-size and the real 44 px touch target is a + // sibling visible affordance — the styled label/button for the avatar + // , and the formatted overlay that fronts the + // sr-only native inside DateField / + // DateTimeField. The touch-target sweep must measure those visible + // affordances, not the hidden input, so exempt any input that is + // visually hidden or collapsed to zero size. + (inp) => !(inp.hidden || inp.height === 0 || inp.width === 0), ); expect(formInputs.length).toBeGreaterThan(0);