From ui-accessibility
Run comprehensive accessibility audits on web projects using axe-core (runtime browser scanning) and eslint-plugin-jsx-a11y (static analysis). Use when the user says "run accessibility scan", "a11y audit", "check accessibility", "WCAG compliance", or references "/a11y". Configurable scan modes (runtime, static, full) let you choose the right level of depth.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ui-accessibility:a11y-auditThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Run comprehensive accessibility audits on web projects using axe-core (runtime browser scanning) and eslint-plugin-jsx-a11y (static analysis). Configurable scan modes let you choose the right level of depth for your needs.
Run comprehensive accessibility audits on web projects using axe-core (runtime browser scanning) and eslint-plugin-jsx-a11y (static analysis). Configurable scan modes let you choose the right level of depth for your needs.
The skill supports three configurable modes. Ask the user which mode they prefer if not specified:
runtime — Browser-based axe-core scan (default)
static — ESLint jsx-a11y static analysis
eslint-plugin-jsx-a11y installed as dev dependencyfull — Both runtime + static combined
Look for routes in the project:
src/app/**/page.tsx or pages/**/*.tsx for routespackage.json scripts (usually dev, start, or serve)For each page, use browser automation to:
https://cdnjs.cloudflare.com/ajax/libs/axe-core/4.8.4/axe.min.js(async () => {
if (!window.axe) {
const script = document.createElement('script');
script.src = 'https://cdnjs.cloudflare.com/ajax/libs/axe-core/4.8.4/axe.min.js';
document.head.appendChild(script);
await new Promise(resolve => { script.onload = resolve; });
}
const results = await axe.run(document, {
runOnly: ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa', 'best-practice']
});
window.__axeResults = {
page: window.location.pathname,
violations: results.violations.length,
passes: results.passes.length,
incomplete: results.incomplete.length,
details: results.violations.map(v => ({
id: v.id,
impact: v.impact,
description: v.description,
helpUrl: v.helpUrl,
nodes: v.nodes.length,
elements: v.nodes.slice(0, 5).map(n => ({
html: n.html.substring(0, 200),
target: n.target,
failureSummary: n.failureSummary
}))
}))
};
})().then(() => console.log('AXE_SCAN_DONE'));
window.__axeResultsAfter all pages are scanned, kill the background dev server process.
Format results as a markdown table with:
Then list each violation with:
Look in package.json devDependencies. If not installed:
pnpm add -D eslint-plugin-jsx-a11y # or npm/yarn based on lockfile
Due to ESLint 9 flat config compatibility issues with some frameworks, create a standalone config:
// eslint.a11y.mjs
import jsxA11y from "eslint-plugin-jsx-a11y";
import tseslint from "typescript-eslint";
export default [
{
files: ["src/**/*.tsx", "src/**/*.jsx"],
plugins: { "jsx-a11y": jsxA11y },
languageOptions: {
parser: tseslint.parser,
parserOptions: { ecmaFeatures: { jsx: true } },
},
rules: { ...jsxA11y.flatConfigs.recommended.rules },
},
];
npx eslint --config eslint.a11y.mjs src/
List each violation with file, line number, rule, and description.
Remove the temporary config file. Keep eslint-plugin-jsx-a11y installed for future use.
Common false positives to note:
role (not HTML role attribute)For each violation found, provide specific fix recommendations:
| Violation | Fix |
|---|---|
region (content not in landmarks) | Wrap page content in <main>, ensure nav in <nav>, footer in <footer> |
heading-order (skipped heading levels) | Change heading level or add intermediate headings; use <p> with styling for decorative text |
color-contrast | Adjust foreground/background colors to meet 4.5:1 ratio (3:1 for large text) |
image-alt | Add descriptive alt text; use alt="" for decorative images |
button-name | Add text content, aria-label, or aria-labelledby to buttons |
link-name | Add text content or aria-label to links |
label | Associate <label> with form controls via htmlFor/id or wrapping |
aria-* | Fix invalid ARIA attributes, roles, or values |
Always present the final report in this structure:
## Accessibility Audit Results
**Scan mode:** [runtime/static/full]
**Standards:** WCAG 2.1 Level AA + Best Practices
**Pages scanned:** [count]
| Page | Violations | Passes | Worst Impact |
|------|-----------|--------|--------------|
| / | 2 | 38 | moderate |
### Violations Found
#### 1. [rule-id] — [impact]
**Description:** [what the rule checks]
**Pages affected:** [list]
**Elements:** [count] instances
**Example:**
```html
<element that failed>
Fix: [specific recommendation] WCAG: [reference]
## Reference Files
- **`references/wcag-quick-ref.md`** — Quick reference for common WCAG 2.1 success criteria
npx claudepluginhub squizai/cc_skillz_marketplace --plugin ui-accessibilityScans frontend code for WCAG A/AA violations: missing alt text, keyboard traps, color contrast issues. Reports by severity with file:line references and fixes.
Audits and fixes WCAG 2.2 accessibility issues. Report mode: sweep codebase/page for prioritized report. Fix mode: audit-edit-verify loop. Prefers live-DOM via CDP, falls back to browser-MCP or HTML-string audits.