Compare two accessibility scans
diff_scanCompare two scans of the same page to report fixed, new, and remaining accessibility issues, confirming whether a fix caused regressions.
Instructions
Compare two scans of the same page and report what changed: fixed[] (in the baseline, gone now), new[] (regressions — not in the baseline, present now), remaining[] (still there). Page-level complement to verify_fix (one element). Baseline is a scan_history id (baselineId, local installs) or a live scan of baselineUrl; current is url (scanned live now) or another history id (currentId). Findings are matched by issue id (rule + element), so a changed class/id on a fixed element reads as fixed AND new — check new[] before calling it a regression. Typical loop: scan_page → edit → diff_scan(baselineId=, url=) → confirm new[] is empty.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | URL to scan now as the CURRENT side (deployed, staging, or http://localhost:3000). Omit when passing currentId. | |
| wcag | No | Only these WCAG criteria. A prefix selects the whole guideline ("1.4") or principle ("2"). | |
| level | No | Highest WCAG conformance level to report. Default "AA" — Level AAA criteria are not reported. Pass "AAA" to include them (naming one AAA criterion in `wcag`, e.g. "3.2.5", also includes it). | |
| rules | No | Only these rule ids (WebAbility type such as "missing_alt" or axe rule id such as "image-alt"). See get_rules. | |
| format | No | "compact" prints one line per element with rule metadata once. "json" returns every field (html, fix values, source). Default: JSON when it fits inline (under ~24k chars), otherwise compact plus a JSON summary of every count. | |
| viewport | No | Viewport for live scans (default: desktop). Use the same viewport the baseline used. | |
| currentId | No | scan_history id to use as the CURRENT side instead of scanning `url` | |
| minImpact | No | Only findings at this severity or above (critical > serious > moderate > minor) | |
| baselineId | No | scan_history id of the BASELINE scan (local installs only) | |
| baselineUrl | No | Scan this URL live as the baseline (e.g. production) — use when there is no stored baseline | |
| rootSelector | No | CSS selector to limit live scans to (optional) |