← 返回 Skills 市场
alirezarezvani

Claude Skills A11y Audit

作者 Alireza Rezvani · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
40
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install claude-skills-a11y-audit
功能描述
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...
使用说明 (SKILL.md)

Accessibility 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.

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).

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

Features

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
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

Severity Definitions

Severity Definition Example SLA
Critical Blocks access for entire user groups Missing alt text, no keyboard access to navigation Fix before release
Major Significant barrier that degrades experience Insufficient color contrast, 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

# 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

/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 -- Walk the source tree, detect framework, apply rule set.

python scripts/a11y_scanner.py /path/to/project --format table

Phase 2: Fix -- Apply framework-specific fixes for each violation.

See references/framework-a11y-patterns.md for the complete fix patterns catalog.

Phase 3: Verify -- Re-run the scanner to confirm fixes and check for regressions.

python scripts/a11y_scanner.py /path/to/project --baseline audit-baseline.json

Example: React Component Audit

// BEFORE: src/components/ProductCard.tsx
function ProductCard({ product }) {
  return (
    \x3Cdiv onClick={() => navigate(`/product/${product.id}`)}>
      \x3Cimg src={product.image} />
      \x3Cdiv style={{ color: '#aaa', fontSize: '12px' }}>{product.name}\x3C/div>
      \x3Cspan style={{ color: '#999' }}>${product.price}\x3C/span>
    \x3C/div>
  );
}
# WCAG Severity Issue
1 1.1.1 Critical \x3Cimg> missing alt attribute
2 2.1.1 Critical \x3Cdiv onClick> not keyboard accessible
3 1.4.3 Major Color #aaa on white fails contrast (2.32:1, needs 4.5:1)
4 1.4.3 Major Color #999 on white fails contrast (2.85:1, needs 4.5:1)
5 4.1.2 Major Interactive element missing role and accessible name
// AFTER: src/components/ProductCard.tsx
function ProductCard({ product }) {
  return (
    \x3Ca href={`/product/${product.id}`} className="product-card"
       aria-label={`View ${product.name} - $${product.price}`}>
      \x3Cimg src={product.image} alt={product.imageAlt || product.name} />
      \x3Cdiv style={{ color: '#595959', fontSize: '12px' }}>{product.name}\x3C/div>
      \x3Cspan style={{ color: '#767676' }}>${product.price}\x3C/span>
    \x3C/a>
  );
}

See references/examples-by-framework.md for Vue, Angular, Next.js, and Svelte examples.

Tools Reference

a11y_scanner.py

Usage: python scripts/a11y_scanner.py \x3Cpath> [options]

Options:
  --json                  Output results as JSON
  --format {table,csv}    Output format (default: table)
  --severity {critical,major,minor}  Filter by minimum severity
  --framework {react,vue,angular,svelte,html,auto}  Force framework (default: auto)
  --baseline FILE         Compare against previous scan results
  --report                Generate stakeholder report
  --output FILE           Write results to file
  --quiet                 Suppress output, exit code only
  --ci                    CI mode: non-zero exit on critical issues

contrast_checker.py

Usage: python scripts/contrast_checker.py [options]

Options:
  --fg COLOR              Foreground color (hex)
  --bg COLOR              Background color (hex)
  --file FILE             Scan CSS file for color pairs
  --tailwind DIR          Scan directory for Tailwind color classes
  --json                  Output results as JSON
  --suggest               Suggest accessible alternatives for failures
  --level {aa,aaa}        Target conformance level (default: aa)

Common Pitfalls

Pitfall Correct Approach
role="button" on a \x3Cdiv> Use native \x3Cbutton> -- includes keyboard handling for free
tabindex="0" on everything Only interactive elements need focus; use native elements
aria-label on non-interactive elements Use aria-labelledby pointing to visible text
display: none for screen reader hiding Use .sr-only class instead
Color alone to convey meaning Add icons, text labels, or patterns alongside color
Placeholder as only label Always provide a visible \x3Clabel>
outline: none without replacement Always provide a visible focus indicator via focus-visible
Empty alt="" on informational images Informational images need descriptive alt text
Skipping heading levels (h1 -> h3) Heading levels must be sequential
onClick without onKeyDown Add keyboard support or prefer native elements
Ignoring prefers-reduced-motion Wrap animations in @media (prefers-reduced-motion: no-preference)

Related Skills

Skill Relationship
senior-frontend Frontend patterns used in a11y fixes
code-reviewer Include a11y checks in code review workflows
senior-qa Integration of a11y testing into QA processes
playwright-pro Automated browser testing with accessibility assertions
epic-design WCAG 2.1 AA compliant animations and scroll storytelling
tdd-guide Test-driven development patterns for a11y test cases

Reference Documentation

Reference Description
wcag-quick-ref.md WCAG 2.2 Level A & AA criteria quick reference
wcag-22-new-criteria.md New WCAG 2.2 success criteria (Focus Appearance, Target Size, etc.)
aria-patterns.md ARIA patterns, keyboard interaction, and live regions
framework-a11y-patterns.md Framework-specific fix patterns (React, Vue, Angular, Svelte, HTML)
color-contrast-guide.md Color contrast checker details, Tailwind palette mapping, sr-only class
ci-cd-integration.md GitHub Actions, GitLab CI, Azure DevOps, pre-commit hook configs
audit-report-template.md Stakeholder-ready audit report template
testing-checklist.md Manual testing checklist (keyboard, screen reader, visual, forms)
examples-by-framework.md Full audit examples for Vue, Angular, Next.js, and Svelte

Resources

安全使用建议
Install is reasonable for local accessibility audits. Before using any `--fix` or agent-applied remediation workflow, run it on a branch, review diffs, and limit the scope to the files you intend to change.
能力评估
Purpose & Capability
The stated purpose is WCAG accessibility scanning, remediation guidance, reporting, and CI checks; the bundled scripts perform local source scanning and color contrast checks consistent with that purpose.
Instruction Scope
The documentation advertises `/a11y-audit --fix` as auto-applying fixes, but the bundled scanner scripts are read-oriented and do not implement file modification; users should still treat any agent-driven fix mode as code-changing.
Install Mechanism
No install hooks, package installs, obfuscated code, or external dependencies were found in the artifact metadata or files.
Credentials
Local file reads over user-selected project paths are proportionate for accessibility auditing; common build and dependency folders are skipped by the scanner.
Persistence & Privilege
There is no background process, privilege escalation, credential access, or automatic persistence; the CI and pre-commit examples are optional, disclosed integrations.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install claude-skills-a11y-audit
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /claude-skills-a11y-audit 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of a comprehensive accessibility audit skill for web projects. - Scans React, Next.js, Vue, Angular, Svelte, and plain HTML for WCAG 2.2 Level A and AA violations - Classifies violations by severity (Critical, Major, Minor) and provides framework-specific before/after code fixes - Supports color contrast checking and includes compliance and stakeholder reporting features - Integrates with CI/CD pipelines for automated accessibility verification - Includes ARIA validation, keyboard navigation checks, and illustrated remediation examples for common issues
元数据
Slug claude-skills-a11y-audit
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Claude Skills A11y Audit 是什么?

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... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 40 次。

如何安装 Claude Skills A11y Audit?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install claude-skills-a11y-audit」即可一键安装,无需额外配置。

Claude Skills A11y Audit 是免费的吗?

是的,Claude Skills A11y Audit 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Claude Skills A11y Audit 支持哪些平台?

Claude Skills A11y Audit 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Claude Skills A11y Audit?

由 Alireza Rezvani(@alirezarezvani)开发并维护,当前版本 v1.0.0。

💬 留言讨论