a11y

GitHub

提供WCAG 2.2无障碍审计与自动修复能力,扫描静态HTML检测屏幕阅读器、键盘导航及结构问题,并应用确定性修复规则。

skills/a11y/SKILL.md Houseofmvps/ultraship

Trigger Scenarios

用户希望检查或改善网页无障碍性 需要修复WCAG合规性问题 希望通过无障碍审查

Install

npx skills add Houseofmvps/ultraship --skill a11y -g -y
More Options

Use without installing

npx skills use Houseofmvps/ultraship@a11y

指定 Agent (Claude Code)

npx skills add Houseofmvps/ultraship --skill a11y -a claude-code -g -y

安装 repo 全部 skill

npx skills add Houseofmvps/ultraship --all -g -y

预览 repo 内 skill

npx skills add Houseofmvps/ultraship --list

SKILL.md

Frontmatter
{
    "name": "a11y",
    "paths": [
        "**\/*.html",
        "**\/*.htm",
        "**\/index.html"
    ],
    "description": "Accessibility audit + auto-fix (WCAG 2.2 A\/AA). Scans built\/static HTML for screen-reader, keyboard, and structure failures, fixes the deterministic ones, and escalates to a rendered scan for contrast and focus. Use when the user wants to check or improve accessibility, fix WCAG issues, or pass an a11y review.",
    "allowed-tools": "Bash, Read, Edit, Grep, Glob",
    "argument-hint": "<url-or-directory>"
}

Accessibility Audit + Auto-Fix (WCAG 2.2)

AI builders ship accessibility violations by default — missing alt text, unlabeled inputs, icon-only buttons, no lang, broken heading order. These are legally consequential (ADA, EU Accessibility Act) and most are deterministically detectable and fixable. This skill finds them AND fixes them.

Process

Phase 1: Scan

Run the static scanner on the project (point it at built/exported HTML, e.g. dist/, build/, out/, .next/, or public/):

node ${CLAUDE_PLUGIN_ROOT}/tools/a11y-scanner.mjs <project-directory>

Parse the JSON: findings[] ({ file, severity, category, rule, message }), summary (counts by severity), and scores.a11y (0–100, or null when no HTML found).

Many pages, each needing fixes? Escalate to a dynamic Workflow (describe the audit and include the word "workflow") so scan → fix → verify runs across pages in parallel instead of one at a time.

Phase 2: Report

Present findings grouped by rule, highest severity first. Map each to its WCAG criterion (already in the message). Make clear which are auto-fixable now vs which need a rendered scan (Phase 4).

Phase 3: Fix (use the Edit tool on the source files)

Apply the deterministic fix for each finding. Do not invent content — for alt text and labels, derive from nearby context (filename, heading, surrounding copy, name/placeholder); if genuinely ambiguous, ask the user rather than guessing.

Rule Fix
html-missing-lang / html-empty-lang Add lang="en" (or the document's real language) to <html>
img-missing-alt Add alt="<concise description>" from context; use alt="" only if the image is purely decorative
input-image-missing-alt Add alt="<what the button does>"
control-missing-label Add a <label for="id">, or aria-label/aria-labelledby. A placeholder is NOT a label — keep it but add a real label
button-no-text Add visible text, or aria-label="<action>" for icon-only buttons
link-no-text Add link text, or aria-label; if it wraps an icon, give the icon alt/aria-label
link-generic-text Rewrite "click here"/"read more" to state the destination ("Read the pricing guide")
positive-tabindex Change to tabindex="0" (or remove) and fix order via DOM order
viewport-zoom-disabled Remove user-scalable=no / maximum-scale=1 from the viewport meta
duplicate-id Make each id unique (and update its label/aria references)
broken-aria-reference Point aria-labelledby/aria-describedby/for at a real element id, or add the missing element
empty-heading Remove the empty heading or give it text
heading-skip Insert the missing level or demote the heading so levels don't jump
missing-title Add a descriptive <title> in <head>
missing-main-landmark Wrap the primary content in <main>

Phase 4: Escalate to a rendered scan (contrast, focus, reading order)

The static scanner cannot see computed styles or focus behavior. When a URL or running dev server is available, run a rendered audit — these tools need no install (npx fetches them) and cover color contrast (WCAG 1.4.3), focus visibility, and ARIA state:

# Pa11y (axe + htmlcs runners). Use --runner axe for axe-core rules.
npx --yes pa11y --standard WCAG2AA <url>

# or the axe CLI directly
npx --yes @axe-core/cli <url>

If the project uses Playwright (Ultraship bundles the Playwright MCP), prefer injecting axe-core into the live page for per-component results. Report contrast and focus findings the static pass could not catch.

Phase 5: Verify

Re-run the scanner and report before/after scores.a11y:

node ${CLAUDE_PLUGIN_ROOT}/tools/a11y-scanner.mjs <project-directory>
node ${CLAUDE_PLUGIN_ROOT}/tools/audit-history.mjs save <project-dir> a11y <score>

Key Principles

  • Fix, don't just audit. Every deterministic finding gets a concrete fix applied.
  • Zero false positives. The scanner only flags source-visible failures; never "fix" something it didn't flag without confirming it's real.
  • Decorative vs meaningful. alt="" is correct for decorative images — don't add fake descriptions to them.
  • Static + rendered together. The scanner catches structure/labels/alt; the rendered pass (Phase 4) catches contrast and focus. A real a11y pass needs both.

Version History

  • ed232cb Current 2026-07-24 16:14

Same Skill Collection

skills/architecture/SKILL.md
skills/brainstorming/SKILL.md
skills/canary/SKILL.md
skills/clone-patterns/SKILL.md
skills/code-review/SKILL.md
skills/compete/SKILL.md
skills/cost/SKILL.md
skills/demo/SKILL.md
skills/deploy/SKILL.md
skills/dispatching-parallel-agents/SKILL.md
skills/evals/SKILL.md
skills/executing-plans/SKILL.md
skills/finishing-a-development-branch/SKILL.md
skills/frontend-design/SKILL.md
skills/grow/SKILL.md
skills/guard/SKILL.md
skills/index-fix/SKILL.md
skills/investigate/SKILL.md
skills/launch/SKILL.md
skills/learn/SKILL.md
skills/onboard/SKILL.md
skills/pentest/SKILL.md
skills/perf-audit/SKILL.md
skills/receiving-code-review/SKILL.md
skills/release/SKILL.md
skills/requesting-code-review/SKILL.md
skills/rescue/SKILL.md
skills/retro/SKILL.md
skills/revise-claude-md/SKILL.md
skills/security-audit/SKILL.md
skills/seo-audit/SKILL.md
skills/seo-strategy/SKILL.md
skills/ship-gate/SKILL.md
skills/sprint/SKILL.md
skills/staying-current/SKILL.md
skills/subagent-driven-development/SKILL.md
skills/systematic-debugging/SKILL.md
skills/test-driven-development/SKILL.md
skills/using-git-worktrees/SKILL.md
skills/using-ultraship/SKILL.md
skills/verification-before-completion/SKILL.md
skills/visual-diff/SKILL.md
skills/writing-plans/SKILL.md
skills/writing-skills/SKILL.md

Metadata

Files
0
Version
ed232cb
Hash
c63259fe
Indexed
2026-07-24 16:14

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-16 20:39
浙ICP备14020137号-1 $mapa de visitantes$