audit_contrast
Compute WCAG contrast ratios for every text element on a page, reporting AA and AAA pass/fail with selector, ratio, and delta-to-pass. Replaces manual eyedropper and ratio math.
Instructions
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 per element and surfaces failing pairs with selector, ratio, and delta-to-pass — replacing manual eyedropper + ratio math.
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 |