audit_contrast
Compute WCAG contrast ratios for every text element on a rendered page (pass url) or from a supplied dom_snapshot. Reports AA (4.5:1 normal, 3:1 large) and AAA pass/fail and surfaces failing pairs with selector, ratio, and delta-to-pass — replacing manual eyedropper + ratio math. dom_snapshot mode returns a row per supplied element; url mode returns counts plus every row that needs action (aa_failures, indeterminate_bg_rows) and OMITS the per-element rows for passing elements, because a real page produces hundreds of thousands of characters of them.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | URL to render and measure (http/https or file://) | |
| screenshot | No | Optional base64 PNG for caller reference; ratios are computed from the DOM, not pixels | |
| dom_snapshot | No | Pre-collected text elements to score without rendering |