a11y-toolkit: forced-colors survival heuristic
a11y_forced_colorsTest whether page content survives Windows High Contrast forced-colors mode by loading normally, emulating forced colors, and flagging SVGs with hardcoded fills that may disappear.
Instructions
Does content survive forced-colors: active (Windows High Contrast)? Loads the page normally, flags SVGs with hardcoded colored fills (they fall back to inherited and icons can vanish), then emulates forced-colors and compares. Review-grade heuristic — the definitive check is visual on Windows HCM; this prepares it. Heuristic rev 1: SVG fills only, images queued for the next rev. Returns JSON: {mode, normal, forced, score, findings, limits}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Page URL to test | |
| lang | No | output language | |
| browser | No | Browser engine (auto = detect the first available) | |
| timeout | No | page load timeout seconds (45 default) | |
| auth_state | No | Path to a Playwright storage_state JSON (exported session) to test behind login — stays local |