From Design I/O & QA
Runs axe-core in headless Chrome via Playwright to audit WCAG 2.0/2.1 AA violations. Generates report with element references. Exits with code 1 on violations for CI/pre-commit integration.
How this skill is triggered — by the user, by Claude, or both
Slash command
/design-io:a11y-auditWhen to use
Финал работы. Часть пайплайна перед сдачей.
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
`axe-core` — индустриальный стандарт. Запускается в headless-Chrome через Playwright.
axe-core — индустриальный стандарт. Запускается в headless-Chrome через Playwright.
npm i -D playwright @axe-core/playwright
npx playwright install chromium
templates/a11y.mjs:
import { chromium } from 'playwright';
import AxeBuilder from '@axe-core/playwright';
import { pathToFileURL } from 'node:url';
import path from 'node:path';
import fs from 'node:fs/promises';
const file = process.argv[2];
if (!file) { console.error('Usage: node a11y.mjs <file>'); process.exit(1); }
const browser = await chromium.launch();
const page = await browser.newPage();
await page.goto(pathToFileURL(path.resolve(file)).href, { waitUntil: 'networkidle' });
const results = await new AxeBuilder({ page })
.withTags(['wcag2a', 'wcag2aa', 'wcag21aa'])
.analyze();
await browser.close();
await fs.writeFile('a11y-report.json', JSON.stringify(results, null, 2));
const v = results.violations;
if (!v.length) {
console.log('✓ Нет нарушений WCAG AA');
process.exit(0);
}
console.error(`\n✗ ${v.length} категорий нарушений:\n`);
for (const violation of v) {
console.error(` [${violation.impact}] ${violation.id} — ${violation.help}`);
console.error(` ${violation.helpUrl}`);
for (const node of violation.nodes.slice(0, 3)) {
console.error(` → ${node.target.join(' ')}`);
console.error(` ${node.failureSummary.split('\n')[0]}`);
}
if (violation.nodes.length > 3) console.error(` ...и ещё ${violation.nodes.length - 3}`);
console.error('');
}
process.exit(1);
node a11y.mjs index.html
Exit code 1 при наличии violations — встраивай в CI / pre-commit.
При сдаче — 0 critical и 0 serious. Moderate допустимо обсуждать.
Для последнего — отдельный manual-чек:
В verifier/templates/verify.mjs добавь флаг --a11y:
if (args.a11y) {
const a11y = await new AxeBuilder({ page }).analyze();
if (a11y.violations.length) problems.push(...);
}
npx claudepluginhub jhamidun/claude-code-config-pack --plugin design-ioProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.