Skip to content

G40 contrast probe fails on display:none elements (hidden inputs measure as black-on-surface) #28

Description

@rz1989s

Context: running the gate engine (check-gates.mjs --render) on a Next.js App Router dashboard (rextorsec/rexdar M3, 2026-09-13). All five views; combined tokens+app+forms CSS passed via --css.

Observed: G40 reported 12 fails on the program-detail view, all input: APCA Lc 10 < 60. The computed pairs (keystone-render/computed.json) show the failing elements are <input type="hidden"> carriers for server-action form data:

{"selector": "input", "color": "oklch(0% 0 0)", "backgroundColor": "oklch(18% 0.012 145)", "width": 0, "height": 0}

Hidden inputs are display: none (UA) — no visible text, nothing to contrast — but the PAIRS_EXPR probe in render-core.mjs walks body * and reads their UA-initial black color against the resolved-up ancestor background.

Expected: zero-size / display:none elements are skipped by the pair probe (same class of exclusion as the existing body * head-children skip, Plan 1b CF1).

Workaround applied on our side: input[type="hidden"] { color: var(--color-text); } — visually a no-op, satisfies the probe. Also noticed along the way: rendering captured Next.js HTML via file:// needs the /_next/static/css/... stylesheet link rewritten to the local combined.css, else the render is unstyled and G40 floods with real-looking failures (Lc 0/35 pairs). Maybe worth a note in the engine README for framework-capture flows.

Env: engine @ getpipher/keystone main (2026-09-13), Node 26.8.2, bundled Playwright driver, viewports 1280,375,320,414,768.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions