axe-rules

Reference axe-core 4.x rule IDs, WCAG mappings, and severity levels for accessibility testing.

Updated Sep 8, 2026
One-click install
npx skills add https://github.com/pedropenha/project-skills --skill axe-rules-pedropenha
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: axe-rules
Source: https://github.com/pedropenha/project-skills/tree/main/.agents/skills/axe-rules
Command: npx skills add https://github.com/pedropenha/project-skills --skill axe-rules-pedropenha

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @axe-core/playwright.

What problem does it solve? Automated accessibility scans produce raw axe-core results that are hard to interpret without knowing each rule's severity, WCAG mapping, and whether it should block a release. This Skill provides a consolidated reference so teams can correctly classify, triage, and act on axe-core findings. ## Core Features & Use Cases - Rule Reference by Severity: Tables of axe-core 4.x rule IDs grouped as critical, serious, moderate, and minor, each with category and description. - WCAG Mapping Guidance: Documents which WCAG 2.0/2.1/2.2 A and AA criteria the rules cover, plus how to treat disabled-by-default AAA and experimental rules. - CI Integration Patterns: Shows how to configure @axe-core/playwright scans with WCAG tags, rule exclusions, and a Definition of Done checklist. - Use Case: A Playwright accessibility test fails on color-contrast and aria-hidden-focus. Use this Skill to confirm both are serious-level rules that must be fixed before release, and to record the raw axe outcome as evidence pending human review. ## Quick Start Ask the AI to review your axe-core scan results and classify each violation by severity and WCAG criterion using the axe rules reference.

Frequently Asked Questions about axe-rules

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run axe-core accessibility tests in Playwright?▼

Use AxeBuilder from @axe-core/playwright, call .withTags(['wcag2a', 'wcag2aa', 'wcag21aa', 'wcag22aa']), then .analyze() after navigating to the page. Assert that results.violations is empty to fail the test on any WCAG 2.x AA violation.

Which axe-core rules are critical severity?▼

Critical rules include image-alt, label, button-name, aria-required-attr, aria-valid-attr-value, aria-roles, duplicate-id-aria, and meta-refresh, among others. These block access for one or more disability groups and must never appear in production.

Does axe-core cover all WCAG 2.2 requirements?▼

No. Axe-core catches roughly 30-40% of WCAG issues automatically and is a baseline, not a conformance decision. Always pair automated scans with manual keyboard and screen reader testing.

How do I disable a specific axe rule in a scan?▼

Call .disableRules(['rule-id']) on the AxeBuilder instance, or use .exclude('#selector') to skip an element. Document the reason and link an issue for every exclusion or disabled rule.

Should an axe violation be treated as a confirmed WCAG failure?▼

Not automatically. Preserve the raw axe outcome and record unreviewed violations as evidence_status automated-indicator with handling review until a human confirms them. Cite the rule's documented WCAG mapping rather than inventing one.