mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-14 15:16:35 +03:00
The analytic walk skips the contrast check when a url() image layer backs text, so CLI scans, CI gates, and the hook had no answer for image-backed text. Outside a browser there is no CORS and no canvas taint: the static engine now reads the image itself, a local file next to the markup or a base64 data URI, decoded with the pure-Rust image crate, sampled on a fixed 6x6 grid, and measured against the text. Static scans have no layout, so the verdict is coarse by design: the finding fires only when the 90th percentile of the grid fails. Uniform tint washes composite exactly, varying scrims keep the skip, no-repeat icons count as decoration, and a remote URL is never fetched. The cascade carries backgroundRepeat / backgroundSize for the decoration gate, stored beside the background shorthand expansion rather than inside it, because the frozen vectors pin that expansion. Fixture sampled-image-contrast.html with generated PNG, JPEG, WebP, alpha and icon images; goldens recorded for the new cases, and the directory sweeps re-recorded (only the fixture's eight findings moved), noted in tests/oracle/DELTAS.md. Refs #560. AI assistance: Claude Code (Claude Fable 5.1), on maintainer instruction. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>