Wcag22 a11y audit

From gabrielmoreira/agent-skills-mirror · View interactive version

Wcag22 a11y audit is an AI agent skill from the GitHub repository gabrielmoreira/agent-skills-mirror. WCAG 2.2 Accessibility Audit skill that systematically evaluates web pages against 8 core Success Criteria (1.1.1, 1.4.3, 1.4.11, 2.1.1, 2.1.2, 2.4.3, 2.4.7, 4.1.2) using accessibility tree inspection and visual analysis. Use this skill when you need to perform accessibility testing/auditing on a li

How to use this skill

Skill file

WCAG 2.2 Accessibility Audit Skill

When to Use This Skill

Use this skill when the user wants to:


Tool Usage Strategy (IMPORTANT)

This skill uses a hybrid approach combining structured accessibility tree analysis and visual inspection.

Priority Order

  1. PRIMARY: Accessibility Tree (search_elements)
  1. SECONDARY: Visual Analysis (Screenshot + LLM)
  1. KEYBOARD INTERACTION: computer tool

Workflow for Each Test

1. Identify scope (page/component/flow)
2. Collect evidence via search_elements and/or screenshot
3. Apply SC-specific judgment rules
4. Record Pass/Fail with evidence references
5. Provide actionable fix recommendations

Threat Context & Privacy Notes

IMPORTANT: This audit may capture sensitive information.


Pre-Audit Setup (Recommended)

Before starting the audit, confirm with the user:

  1. Target Scope: Full page, specific component, or user flow?
  2. Target Audience: Who are the primary users? (general public, internal staff, specific disability considerations)
  3. Priority SCs: Test all 8 SCs or focus on specific ones?
  4. Known Issues: Any existing accessibility issues to verify?

Success Criteria Test Procedures

SC 1.1.1 Non-text Content (Level A)

Goal: All non-text content (images, icons, controls) must have text alternatives.

Test Steps:

  1. Find images and icons:

```

search_elements(tabId, "image | img")

search_elements(tabId, "button | link | menuitem | tab | switch")

```

  1. Evaluate each element:
  1. For decorative content:

Common Failures:

Fix Recommendations:


SC 1.4.3 Contrast (Minimum) (Level AA)

Goal: Text must have sufficient contrast against its background.

Requirements:

Test Steps:

  1. Capture page states:

```

capture_screenshot(sendToLLM=true)

```

  1. Visual analysis prompt (for LLM):

> "Analyze this screenshot for text contrast issues. Identify any text that appears to have low contrast against its background. Focus on:

> - Small/body text that may be below 4.5:1

> - Placeholder text in input fields

> - Disabled state text

> - Text overlaid on images or gradients

> List suspicious elements with their approximate location."

  1. Record findings:

Common Failures:

Fix Recommendations:


SC 1.4.11 Non-text Contrast (Level AA)

Goal: UI components and graphical objects must have ≥ 3:1 contrast.

Applies to:

Test Steps:

  1. Identify UI components:

```

search_elements(tabId, "textbox | combobox | checkbox | radio | switch | button | slider")

```

  1. Capture states:

```

capture_screenshot(sendToLLM=true)

```

  1. Visual analysis prompt:

> "Analyze this screenshot for non-text contrast issues. Check if:

> - Input field borders are clearly visible (≥3:1 against background)

> - Button boundaries are distinguishable

> - Icons are clearly visible

> - Focus indicators have sufficient contrast

> - Checkbox/radio/switch states are visually distinct

> List any elements that appear to have insufficient contrast."

  1. State coverage matrix:

Document which states were tested for each component type.

Common Failures:

Fix Recommendations:


SC 2.1.1 Keyboard (Level A)

Goal: All functionality must be operable via keyboard.

Test Steps:

  1. Identify key tasks: Ask user or determine primary interactive flows
  1. Attempt keyboard-only completion:

```

computer(action='key', text='Tab') // Navigate forward

computer(action='key', text='shift+Tab') // Navigate backward

computer(action='key', text='Enter') // Activate buttons/links

computer(action='key', text='Space') // Activate buttons, toggle checkboxes

computer(action='key', text='Escape') // Close dialogs/menus

computer(action='key', text='ArrowDown') // Navigate within widgets

```

  1. At each step:
  1. Cross-reference with accessibility tree:

```

search_elements(tabId, "*")

```

Common Failures:

Fix Recommendations:


SC 2.1.2 No Keyboard Trap (Level A)

Goal: If focus can enter a component, it must be able to exit via keyboard.

Test Steps:

  1. Identify potential trap components:
  1. For each component:
  1. Capture evidence:

```

capture_screenshot(sendToLLM=true)

```

Common Failures:

Fix Recommendations:


SC 2.4.3 Focus Order (Level A)

Goal: Focus order must preserve meaning and operability.

Test Steps:

  1. Tab through the page:

```

computer(action='key', text='Tab')

```

  1. Compare with visual order:

```

capture_screenshot(sendToLLM=true)

```

  1. Test dynamic content:
  1. Check for problematic patterns:

```

search_elements(tabId, "tabindex")

```

Common Failures:

Fix Recommendations:


SC 2.4.7 Focus Visible (Level AA)

Goal: Keyboard focus indicator must be visible.

Test Steps:

  1. Ensure keyboard-only mode:
  1. At each focused element:

```

capture_screenshot(sendToLLM=true)

```

  1. Visual analysis prompt:

> "Is there a visible focus indicator on the currently focused element in this screenshot? The indicator should be clearly distinguishable (outline, border, background change, underline, or similar). Describe what you see and whether it provides sufficient visual distinction."

  1. Cross-reference:

```

search_elements(tabId, "focused")

```

Common Failures:

Fix Recommendations:


SC 4.1.2 Name, Role, Value (Level A)

Goal: All UI components must expose name, role, and value to assistive technology.

Test Steps:

  1. Extract interactive elements:

```

search_elements(tabId, "button | link | textbox | combobox | checkbox | radio | switch | tab | menuitem | slider | spinbutton | searchbox")

```

  1. For each element, verify:
  1. Test state changes:
  1. Common patterns to check:

Common Failures:

Fix Recommendations:


Report Output Template

After completing the audit, generate a Markdown report with this structure:

# WCAG 2.2 Accessibility Audit Report

**Target**: [URL or Page Name]  
**Date**: [Audit Date]  
**Scope**: [Full page / Component / User flow]  
**Auditor**: AIPex WCAG 2.2 A11y Audit Skill

---

## Executive Summary

[1-2 sentence overall assessment. Example: "The page has significant accessibility barriers, particularly in keyboard navigation and missing text alternatives for icon buttons. X of 8 Success Criteria tested have issues."]

---

## Scope & Assumptions

- **Pages/Components Tested**: [List]
- **Testing Method**: Accessibility tree inspection via search_elements + visual analysis via screenshots + keyboard navigation testing
- **Limitations**: Contrast assessments are visual estimates; recommend verification with dedicated tools.
- **Privacy Note**: Screenshots may have been captured; ensure sensitive data is masked before sharing this report.

---

## Results by Success Criterion

### 1.1.1 Non-text Content (Level A)

**Result**: [PASS / FAIL / PARTIAL]

**Evidence**:
- [Describe findings]
- [[screenshot:N]] (if applicable)

**Issues Found**:
| Element | Issue | Severity |
|---------|-------|----------|
| [element description] | [issue description] | [Critical/Serious/Moderate/Minor] |

**Recommendations**:
- [Specific fix recommendations]

---

### 1.4.3 Contrast (Minimum) (Level AA)

**Result**: [PASS / FAIL / PARTIAL / NEEDS VERIFICATION]

**Evidence**:
- [[screenshot:N]]

**Suspected Issues**:
| Element | Suspected Issue | Needs Verification |
|---------|-----------------|---------------------|
| [location/description] | [suspected contrast issue] | Yes |

**Recommendations**:
- Verify with contrast checker tool
- [Specific fixes if contrast is confirmed insufficient]

---

### 1.4.11 Non-text Contrast (Level AA)

**Result**: [PASS / FAIL / PARTIAL / NEEDS VERIFICATION]

**Evidence**:
- [[screenshot:N]]

**State Coverage**:
| Component Type | Default | Hover | Focus | Disabled |
|----------------|---------|-------|-------|----------|
| Input fields   | ✓/✗    | ✓/✗   | ✓/✗   | ✓/✗     |
| Buttons        | ✓/✗    | ✓/✗   | ✓/✗   | ✓/✗     |

**Issues Found**:
[List issues]

**Recommendations**:
[Fix recommendations]

---

### 2.1.1 Keyboard (Level A)

**Result**: [PASS / FAIL]

**Test Flow**: [Describe the task attempted]

**Evidence**:
- [[screenshot:N]]
- Accessibility tree excerpt: [relevant portion]

**Issues Found**:
| Step | Element | Issue |
|------|---------|-------|
| [step #] | [element] | [keyboard issue] |

**Recommendations**:
[Fix recommendations]

---

### 2.1.2 No Keyboard Trap (Level A)

**Result**: [PASS / FAIL / NOT APPLICABLE]

**Components Tested**:
| Component | Entry | Exit via Tab | Exit via Esc | Instructions |
|-----------|-------|--------------|--------------|--------------|
| [modal]   | ✓     | ✓/✗         | ✓/✗         | ✓/✗         |

**Evidence**:
- [[screenshot:N]]

**Issues Found**:
[List issues]

**Recommendations**:
[Fix recommendations]

---

### 2.4.3 Focus Order (Level A)

**Result**: [PASS / FAIL]

**Evidence**:
- [[screenshot:N]]
- Focus sequence: [describe order]

**Issues Found**:
[List focus order problems]

**Recommendations**:
[Fix recommendations]

---

### 2.4.7 Focus Visible (Level AA)

**Result**: [PASS / FAIL / PARTIAL]

**Evidence**:
- [[screenshot:N]] showing focus on [element type]

**Issues Found**:
| Element Type | Focus Visible | Notes |
|--------------|---------------|-------|
| Buttons      | ✓/✗          | [description] |
| Links        | ✓/✗          | [description] |
| Inputs       | ✓/✗          | [description] |

**Recommendations**:
[Fix recommendations]

---

### 4.1.2 Name, Role, Value (Level A)

**Result**: [PASS / FAIL / PARTIAL]

**Evidence**:
- Accessibility tree excerpt:
  ```
  [relevant search_elements output]
  ```

**Issues Found**:
| Element | Role Issue | Name Issue | State Issue |
|---------|------------|------------|-------------|
| [element] | [issue] | [issue] | [issue] |

**Recommendations**:
[Fix recommendations]

---

## Issue Summary (by Severity)

### Critical
[List critical issues - prevent access entirely]

### Serious  
[List serious issues - significant barriers]

### Moderate
[List moderate issues - degraded experience]

### Minor
[List minor issues - best practice violations]

---

## Next Steps

1. Address Critical and Serious issues first
2. Re-test after fixes using the same procedures
3. Consider automated testing tools for ongoing monitoring (axe, WAVE, Lighthouse)
4. Verify contrast issues with dedicated contrast checker tools

---

## Appendix: Screenshot Evidence

[Screenshots will be attached when exporting via download_current_chat_report_zip]

Report Export

After completing the audit report, ask the user:

"Would you like me to export this accessibility audit report as a ZIP file with all screenshots included?"

Upon confirmation, use download_current_chat_report_zip tool to package the report with all captured screenshots.

The ZIP will contain:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.