widget-golden-and-a11y-testinglisted
Install: claude install-skill zakariaf/CatchLaw
# Widget, golden and accessibility testing
One harness pins the surface; layout and accessibility are asserted by **computed
geometry on the real widget tree**, not by blessed pixels. Goldens are a narrow,
honest safety net for glyph shaping and mirroring — never the layout gate. This
skill covers the widget tier; for the pure-core / Drift / Notifier tiers see
`testing-strategy`.
Read the reference for the task at hand:
- `references/harness-and-mediaquery.md` — pumpApp, Device presets, the four load-bearing lines, driving MediaQuery flags, finder policy.
- `references/overflow-and-textscale.md` — the two overflow classes, the three traps, the matrix, the fit assertion, and the four wrong fixes.
- `references/a11y-guidelines-and-limits.md` — the four built-in guidelines and their defects, the semantics/traversal gate, pure-Dart contrast, and what automation genuinely cannot cover.
- `references/golden-two-lanes.md` — the golden-refusal argument, the Ahem-vs-real-font lanes, RTL goldens, and blocking accidental blessing.
Run `scripts/check-test-hygiene.sh` before a PR.
## Non-negotiable rules
1. **Pin the device on every layout/geometry test.** The default widget surface
is **800x600 logical** — wider than any phone. Unpinned, content is ~2x too
wide, everything fits, the suite is green, and the shipped phone is broken.
`useDevice(...)` first, `pumpApp(...)` second.
2. **`physicalSize` is in PHYSICAL pixels — always multiply by DPR.**
`view.physicalSize = Size