Accessibility (WCAG) Audit
accessibility-auditAudits the live iOS simulator accessibility tree against WCAG rules, returning a severity summary and prioritized fixable issues.
Instructions
accessibility-audit
WCAG-aligned accessibility audit of the live iOS simulator accessibility tree.
Overview
Fetches the full accessibility tree via idb ui describe-all, flattens it, and evaluates
every element against a tiered rule set (critical → warning → info). Returns a severity
summary and either the full issue list (verbose mode) or the top issues grouped by rule.
Distinct from accessibility-quality-check, which only scores tree richness. This tool
diagnoses what is broken and how to fix it.
Parameters
Optional
udid (string): Target identifier — auto-detects if omitted
verbose (boolean): Return all issues instead of grouped top-10 (default: false)
Rules
Critical — blocks assistive technology users
Rule | Condition | Fix |
missing_label | Button or Link with no AXLabel | Add accessibilityLabel |
empty_button | Button with no AXLabel AND no AXValue | Set button title or accessibilityLabel |
image_no_alt | Image with no AXLabel | Add accessibilityLabel with description |
Warning — degrades UX
Rule | Condition | Fix |
missing_hint | Slider or TextField with no help text | Add accessibilityHint |
missing_traits | Element has type but no traits | Set appropriate accessibilityTraits |
small_touch_target | Tappable frame < 44×44pt | Increase tappable area to at least 44×44pt |
Info — best-practice suggestions
Rule | Condition | Fix |
no_identifier | Element missing AXUniqueId | Add accessibilityIdentifier for testing |
deep_nesting | Element depth > 5 | Simplify view hierarchy |
Returns
summary:
{ total, critical, warning, info }issues (verbose mode): Full issue list
topIssues (default): Issues grouped by rule, sorted by severity then count, capped at 10
Structured Content
{ "total": 3, "critical": 1, "warning": 1, "info": 1 }Examples
// Quick audit — top issues only
const result = await accessibilityAuditTool({});
// Full details for CI reporting
const result = await accessibilityAuditTool({ verbose: true });Related Tools
accessibility-quality-check: Richness score — use before deciding accessibility vs screenshotidb-ui-describe: Full accessibility tree for manual inspection
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| udid | No | ||
| verbose | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| info | Yes | ||
| total | Yes | ||
| warning | Yes | ||
| critical | Yes |