---
Name: a11y-audit
Tier: STANDARD
Category: engineering
Dependencies: none
Author: Alireza Rezvani
Version: 2.1.2
name: "a11y-audit"
description: "Accessibility audit skill for scanning, fixing, and verifying WCAG 2.2 Level A and AA compliance across React, Next.js, Vue, Angular, Svelte, and plain HTML codebases. Use when auditing accessibility, fixing a11y violations, checking color contrast, generating compliance reports, or integrating accessibility checks into CI/CD pipelines."
license: MIT
metadata:
updated: 2026-03-18
---
# Accessibility Audit
---
**Name**: a11y-audit
**Tier**: STANDARD
**Category**: Engineering - Frontend Quality
**Dependencies**: Python 3.8+ (Standard Library Only)
**Author**: Alireza Rezvani
**Version**: 2.1.2
**Last Updated**: 2026-03-18
**License**: MIT
---
## Name
a11y-audit -- WCAG 2.2 Accessibility Audit and Remediation Skill
## Description
The a11y-audit skill provides a complete accessibility audit pipeline for modern web applications. It implements a three-phase workflow -- Scan, Fix, Verify -- that identifies WCAG 2.2 Level A and AA violations, generates exact fix code per framework, and produces stakeholder-ready compliance reports.
This skill goes beyond detection. For every violation it finds, it provides the precise before/after code fix tailored to your framework (React, Next.js, Vue, Angular, Svelte, or plain HTML). It understands that a missing `alt` attribute on an `` in React JSX requires a different fix pattern than the same issue in a Vue SFC or an Angular template.
**What this skill does:**
1. **Scans** your codebase for every WCAG 2.2 Level A and AA violation, categorized by severity (Critical, Major, Minor)
2. **Fixes** each violation with framework-specific before/after code patterns
3. **Verifies** that fixes resolve the original violations and introduces no regressions
4. **Reports** findings in a structured format suitable for developers, PMs, and compliance stakeholders
5. **Integrates** into CI/CD pipelines to prevent accessibility regressions
**Key differentiators:**
- Framework-aware fix patterns (not generic HTML advice)
- Color contrast analysis with accessible alternative suggestions
- WCAG 2.2 coverage including the newest success criteria (Focus Appearance, Dragging Movements, Target Size)
- CI/CD pipeline integration with GitHub Actions, GitLab CI, and Azure DevOps
- Slash command support via `/a11y-audit`
## Features
### Core Capabilities
| Feature | Description |
|---------|-------------|
| **Full WCAG 2.2 Scan** | Checks all Level A and AA success criteria across your codebase |
| **Framework Detection** | Auto-detects React, Next.js, Vue, Angular, Svelte, or plain HTML |
| **Severity Classification** | Categorizes each violation as Critical, Major, or Minor |
| **Fix Code Generation** | Produces before/after code diffs for every issue |
| **Color Contrast Checker** | Validates foreground/background pairs against AA and AAA ratios |
| **Accessible Alternatives** | Suggests replacement colors that meet contrast requirements |
| **Compliance Reporting** | Generates stakeholder reports with pass/fail summaries |
| **CI/CD Integration** | GitHub Actions, GitLab CI, Azure DevOps pipeline configs |
| **Keyboard Navigation Audit** | Detects missing focus management and tab order issues |
| **ARIA Validation** | Checks for incorrect, redundant, or missing ARIA attributes |
| **Live Region Detection** | Identifies dynamic content lacking `aria-live` announcements |
| **Form Accessibility** | Validates label associations, error messaging, and input types |
### WCAG 2.2 Coverage Matrix
| Principle | Level A Criteria | Level AA Criteria |
|-----------|-----------------|-------------------|
| **Perceivable** | 1.1.1 Non-text Content, 1.2.1-1.2.3 Time-based Media, 1.3.1-1.3.3 Adaptable, 1.4.1-1.4.2 Distinguishable | 1.3.4-1.3.5 Adaptable, 1.4.3-1.4.5 Contrast & Images of Text, 1.4.10-1.4.13 Reflow & Content |
| **Operable** | 2.1.1-2.1.2 Keyboard, 2.2.1-2.2.2 Timing, 2.3.1 Seizures, 2.4.1-2.4.4 Navigable, 2.5.1-2.5.4 Input | 2.4.5-2.4.7 Navigable, 2.4.11 Focus Appearance (NEW 2.2), 2.5.7 Dragging (NEW 2.2), 2.5.8 Target Size (NEW 2.2) |
| **Understandable** | 3.1.1 Language, 3.2.1-3.2.2 Predictable, 3.3.1-3.3.2 Input Assistance | 3.1.2 Language of Parts, 3.2.3-3.2.4 Predictable, 3.3.3-3.3.4 Error Handling, 3.3.7 Redundant Entry (NEW 2.2), 3.3.8 Accessible Auth (NEW 2.2) |
| **Robust** | 4.1.2 Name/Role/Value | 4.1.3 Status Messages |
### Severity Definitions
| Severity | Definition | Example | SLA |
|----------|-----------|---------|-----|
| **Critical** | Blocks access for entire user groups | Missing alt text on informational images, no keyboard access to primary navigation | Fix before release |
| **Major** | Significant barrier that degrades experience | Insufficient color contrast on body text, missing form labels | Fix within current sprint |
| **Minor** | Usability issue that causes friction | Redundant ARIA roles, suboptimal heading hierarchy | Fix within next 2 sprints |
## Usage
### Quick Start
Activate the skill and run an audit on your project:
```bash
# Scan entire project
python scripts/a11y_scanner.py /path/to/project
# Scan with JSON output for tooling
python scripts/a11y_scanner.py /path/to/project --json
# Check color contrast for specific values
python scripts/contrast_checker.py --fg "#777777" --bg "#ffffff"
# Check contrast across a CSS/Tailwind file
python scripts/contrast_checker.py --file /path/to/styles.css
```
### Slash Command
Use the `/a11y-audit` slash command for an interactive audit session:
```
/a11y-audit # Audit current project
/a11y-audit --scope src/ # Audit specific directory
/a11y-audit --fix # Audit and auto-apply fixes
/a11y-audit --report # Generate stakeholder report
/a11y-audit --ci # Output CI-compatible results
```
### Three-Phase Workflow
#### Phase 1: Scan
The scanner walks your source tree, detects the framework in use, and applies the appropriate rule set.
```bash
python scripts/a11y_scanner.py /path/to/project --format table
```
**Sample output:**
```
A11Y AUDIT REPORT - /path/to/project
Framework Detected: React (Next.js)
Files Scanned: 127
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CRITICAL (3 issues)
[1.1.1] src/components/Hero.tsx:14
Missing alt text on element
[2.1.1] src/components/Modal.tsx:8
Focus not trapped inside modal dialog
[1.4.3] src/styles/globals.css:42
Contrast ratio 2.8:1 on .subtitle (requires 4.5:1)
MAJOR (7 issues)
[2.4.11] src/components/Button.tsx:22
Focus indicator not visible (2px outline required)
[1.3.1] src/components/Form.tsx:31
Input missing associated