axe-a11y
БесплатноБез исполняемых скриптовНе проверенUse for any request to check accessibility automatically, including adding a scan to an existing Playwright, Cypress or unit test, or stopping missing labels…
от testland★ 18 звёзд на GitHubОб этом скилле
axe-a11y
Overview
axe-core is "an accessibility testing engine for websites and other HTML-based user interfaces" maintained by Deque (axe-core). It identifies approximately 57% of WCAG issues automatically and flags items requiring human review as "incomplete" (axe-core).
The integration shape: load the engine into a page (via test
fixture, browser extension, or framework adapter), call
axe.run(), and parse the violations[] array.
When to use
- The project ships JavaScript / TypeScript UI tests (Playwright / Cypress / Jest / Vitest).
- Automated a11y coverage on every PR is a goal.
- The team values WCAG SC tagging - axe rules map cleanly to WCAG 2.0 / 2.1 / 2.2 SCs.
- Pair with
a11y-violation-gatefor the ratchet pattern over baseline.
If axe-core's direct integration doesn't fit, route to the other scanners below.
Other scanners
axe-core is the primary engine; four alternatives live in references/, each with verified install / CLI / API / CI patterns:
| Scanner | Reach for it when | Reference |
|---|---|---|
| pa11y (htmlcs + axe engines) | Scriptable CLI scans without a test framework; multi-URL batching via pa11y-ci. | references/pa11y.md |
| Lighthouse a11y | The project already runs Lighthouse CI and wants a11y in the same pipeline. | references/lighthouse-a11y.md |
| WAVE | WebAIM-branded reports, visual overlay for designers, or third-party-site audits. | references/wave.md |
| IBM Equal Access | US Section 508 procurement or IBM-branded enterprise compliance. | references/ibm-equal-access.md |
All five emit JSON that a11y-violation-gate normalizes and ratchets.
Install
npm install --save-dev axe-core
(Per axe-core.)
For framework integration (preferred over raw axe.run()):
| Package | When to use |
|---|---|
@axe-core/playwright |
Playwright tests. |
@axe-core/react |
React-component scans during rendering. |
@axe-core/cli |
Headless CLI for arbitrary URLs. |
axe-core/api/install (raw) |
Custom integrations. |
Authoring scans
Raw axe.run() API
import axe from 'axe-core';
axe.run()
.then(results => {
if (results.violations.length) {
console.error('a11y violations:', results.violations);
}
})
.catch(err => {
console.error('axe error:', err.message);
});
(Adapted from axe-core.)
For test environments where loading axe via <script> is easier:
<script src="node_modules/axe-core/axe.min.js"></script>
Playwright integration
import { test, expect } from '@playwright/test';
import AxeBuilder from '@axe-core/playwright';
test('checkout page passes axe scan', async ({ page }) => {
await page.goto('/checkout');
const accessibilityScanResults = await new AxeBuilder({ page })
.withTags(['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa', 'wcag22aa']) // WCAG 2.2 A + AA
.analyze();
expect(accessibilityScanResults.violations).toEqual([]);
});
Traps that silently shrink a scan
A green axe test can mean "axe looked at less than you think". Check these before trusting one.
AxeBuilder calls overwrite each other (from the @axe-core/playwright source):
withTags()andwithRules()both setrunOnly; the last call wins, so.withTags([...]).withRules(['region'])runs onlyregion.disableRules()starts a freshrulesmap on every call, so calling it in a loop keeps only the last rule disabled.options(obj)replaces the whole options object, wiping everywithTags,withRulesanddisableRulescall made before it.
To scan a tag set plus extra rules minus skipped ones, build one options object. Per the axe API, "By combining runOnly with type: tags and the rules option, a modified set can be defined":
const results = await new AxeBuilder({ page })
.options({
runOnly: { type: 'tag', values: ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa', 'wcag22aa'] },
rules: {
region: { enabled: true }, // best-practice rules added on top
'frame-tested': { enabled: true },
'color-contrast': { enabled: false }, // skipped: reason + review date
},
})
.analyze();
Guard the helper itself:
Установить axe-a11y в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл axe-a11y?
Use for any request to check accessibility automatically, including adding a scan to an existing Playwright, Cypress or unit test, or stopping missing labels and contrast errors from shipping: axe-core via axe.run(), @axe-core/playwright or the CLI on every PR, rule configuration and CI-gateable results, plus pa11y, Lighthouse CI, WAVE and IBM Equal Access in its references.
Как установить скилл axe-a11y?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл axe-a11y запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic