Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

a11y-audit

БесплатноЗапускает вложенные скриптыНе проверен

Static WCAG scan of HTML files (alt text, headings, labels, ARIA, lang, landmarks) and colour contrast checks for colour pairs or CSS. Use when auditing…

borgheiот borghei★ 1 250 звёзд на GitHub

Об этом скилле

Accessibility Audit

Category: Engineering Domain: Web Accessibility

Overview

The agent uses this skill to scan HTML source for WCAG 2.1 violations (plus WCAG 2.2 SC 3.3.8, paste blocking on credential fields) and to check colour contrast against AA/AAA. It catches missing alt text, broken heading hierarchies, unlabeled form inputs and low contrast early, before a browser-based audit. The rule set targets WCAG 2.1 on purpose: the other WCAG 2.2 additions (target size, focus not obscured, dragging alternatives) depend on rendered layout and need a browser or manual check.

When to Use

  • Reviewing HTML templates or static pages for accessibility before release.
  • Checking a palette or a stylesheet's colour pairs against AA/AAA contrast.
  • Adding a Level A gate to CI for template changes.
  • Triaging an accessibility bug report down to specific elements.

Clarify First

Before running the audit, settle the inputs below. When one is missing or vague and would change the result, ask about it; when it wouldn't, use a sensible default and say which one you used.

  • Target & scope: which HTML files, directory, or CSS to scan (determines what gets checked and the --file/--dir/--css arguments).
  • Conformance level: A, AA, or AAA target (sets contrast thresholds and which violations are CRITICAL vs WARNING vs INFO).
  • Use context: one-off remediation vs CI gate (drives --strict gating and JSON output).

Ask about the two or three inputs that matter most for this request, not the whole list. If the user wants a result straight away, produce it and state your assumptions at the top.

Quick Start

# Scan HTML for WCAG 2.1 violations
python scripts/a11y_scanner.py --file index.html

# Scan a directory of HTML files
python scripts/a11y_scanner.py --dir ./src/templates

# Check color contrast
python scripts/contrast_checker.py --foreground "#333333" --background "#ffffff"

# Parse CSS file for contrast issues
python scripts/contrast_checker.py --css styles.css

# JSON output for CI
python scripts/a11y_scanner.py --file index.html --format json

# Bundled samples
python scripts/a11y_scanner.py --file examples/sample-page.html              # many violations, exit 1
python scripts/a11y_scanner.py --file examples/sample-page-accessible.html   # 0 findings, exit 0

Exit codes. a11y_scanner.py: 0 no Level A (critical) finding, or with --strict no finding at all at the chosen --level; 1 otherwise; 2 missing file or directory, or a --file that is not HTML. contrast_checker.py: 0 all checked pairs pass AA normal text, 1 a pair fails, 2 bad input (invalid colour or unreadable CSS).

Tools Overview

a11y_scanner.py

Scans HTML files for WCAG 2.1 violations including structural, semantic, and interactive element issues.

Feature Description
Image alt text Detects missing or empty alt on non-decorative images
Heading hierarchy Validates h1-h6 levels are sequential
Form labels Ensures inputs have associated label elements
ARIA attributes Checks ARIA usage correctness
Link text Flags generic text like "click here" or "read more"
Language attribute Checks for lang on html element
Tab order Detects positive tabindex values
Landmarks Validates semantic landmark usage

contrast_checker.py

Checks color contrast ratios against the WCAG 2.1 AA and AAA thresholds.

Feature Description
Ratio calculation Computes relative luminance contrast ratio
AA compliance 4.5:1 normal text, 3:1 large text
AAA compliance 7:1 normal text, 4.5:1 large text
CSS parsing Extracts color/background pairs from CSS
Color suggestions Recommends nearest compliant color

Workflows

Full Accessibility Audit

  1. Scan HTML - Run a11y_scanner.py on all templates
  2. Check contrast - Run contrast_checker.py on stylesheets
  3. Triage - Prioritize Level A violations first
  4. Remediate - Fix critical issues (alt text, form labels, headings)
  5. Re-scan - Verify fixes pass all checks

CI Integration

# Gate on Level A violations
python scripts/a11y_scanner.py --dir ./templates --format json --level A --strict

# Check CSS contrast
python scripts/contrast_checker.py --css ./static/css/main.css --format json

Development Workflow

  1. Pre-commit - Quick scan of changed HTML files
  2. PR review - Full scan as part of review checklist
  3. Staging audit - Comprehensive scan before release
  4. Monitoring - Regular scheduled audits

Anti-Patterns

Clean scan as conformance claim

Mistake: Publishing "WCAG AA compliant" because the scanner found nothing. Why it happens: Zero findings reads like a pass. Instead: The scanner covers a subset of criteria in static source. State what was checked, then test keyboard navigation, focus order and a screen reader on the rendered page.

A

Полный SKILL.md на GitHub

Установить a11y-audit в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

examples/sample-page-accessible.htmlexamples/sample-page.htmlreferences/wcag-guidelines.mdscripts/a11y_scanner.pyscripts/contrast_checker.py

FAQ

Что делает скилл a11y-audit?

Static WCAG scan of HTML files (alt text, headings, labels, ARIA, lang, landmarks) and colour contrast checks for colour pairs or CSS. Use when auditing templates for accessibility, checking contrast, or adding an a11y gate to CI.

Как установить скилл a11y-audit?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл a11y-audit запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить a11y-audit с