Audit Tools
12 tools for accessibility, visual regression, performance, and design system auditing. Registered after calling connect.
audit_a11y
Run an accessibility audit using axe-core.
| Parameter | Type | Default | Description |
|---|---|---|---|
scope | string | — | CSS selector to limit the audit scope |
tags | string[] | — | WCAG tags to check (e.g., ["wcag2a", "wcag2aa"]) |
Returns: Violations grouped by severity (critical, serious, moderate, minor), passes, and incomplete checks.
audit_contrast
Check color contrast ratios against WCAG AA.
Returns:
- Failing elements with computed foreground/background colors and contrast ratios
- Passing count
- Resolves effective background through parent element chain
audit_focus_order
Analyze keyboard focus order and tab sequence.
Returns:
- Tab sequence in order
- Focus traps detected
- Hidden but focusable elements
- Elements with positive
tabindex - Label reference issues
audit_responsive
Capture screenshots at multiple viewport widths.
| Parameter | Type | Default | Description |
|---|---|---|---|
viewports | number[] | [375, 768, 1024, 1440] | Viewport widths in pixels |
Returns: Screenshot grid with detected issues (overflow, truncation, small tap targets).
audit_snapshot
Capture a visual baseline for later comparison.
| Parameter | Type | Default | Description |
|---|---|---|---|
name | string | required | Baseline identifier |
viewports | number[] | — | Capture at specific viewport widths |
Returns: Saved baseline file paths.
audit_diff
Compare the current page against a previously captured baseline.
| Parameter | Type | Default | Description |
|---|---|---|---|
name | string | required | Baseline to compare against |
threshold | number | 0.1 | Pixel diff threshold (0-1) |
viewport | number | — | Specific viewport width, or all if omitted |
Returns: Diff percentage, pass/fail status, and a diff overlay image highlighting changed pixels.
audit_tokens
Detect design token drift by comparing computed styles against your token definitions.
| Parameter | Type | Default | Description |
|---|---|---|---|
tokensFile | string | required | Path to JSON token definitions |
Returns: Violations with the actual value, expected token, and closest match with CIE76 delta-E distance for colors.
audit_dark_mode
Compare your page in light mode vs dark mode.
Returns:
hasDarkMode— whether the page responds toprefers-color-scheme: darkdiffPercentage— pixel difference between modes- Light screenshot, dark screenshot, and diff image
audit_reduced_motion
Check compliance with prefers-reduced-motion.
Returns: List of CSS animations and transitions found, flagging those that don't respect the media query.
audit_aria_valid
Deep ARIA validation beyond what axe-core covers.
Returns:
- Role validity checks
- Required attribute presence
- Label reference integrity
aria-hiddenissues- Landmark structure analysis
audit_perf
Measure Core Web Vitals.
Returns:
- LCP (Largest Contentful Paint) — with the LCP element identified
- FCP (First Contentful Paint)
- CLS (Cumulative Layout Shift)
- TTFB (Time to First Byte)
- Rating for each: Good / Needs Improvement / Poor
audit_explain
Synthesize results from multiple audits into a grouped diagnosis.
| Parameter | Type | Default | Description |
|---|---|---|---|
runA11y | boolean | true | Include a11y audit |
runContrast | boolean | true | Include contrast check |
runAria | boolean | true | Include ARIA validation |
tokensFile | string | — | Include token drift check |
Returns: Violations grouped by root cause, systemic issues identified, and fixes ranked by impact. Designed for AI consumption.
audit_snapshot_update
Re-capture an existing baseline, replacing the previous version.
| Parameter | Type | Default | Description |
|---|---|---|---|
name | string | required | Baseline to update |
viewports | number[] | — | Viewport widths |
Returns: What changed before overwriting.