Analyzes web pages or raw HTML for accessibility issues using Pa11y , powered by HTML CodeSniffer. Supports multiple WCAG standards and provides detailed violation reports with enriched human context.
Best For
WCAG 2.1 AA or AAA level validation
Standards-based testing (Section 508, WCAG2A, WCAG2AA, WCAG2AAA)
HTML CodeSniffer-based analysis
Catching issues that axe-core might miss
Parameters
URL of the page to analyze Either url or html is required, but not both.
Raw HTML content to analyze (alternative to URL) Useful for analyzing HTML snippets or templates before deployment.
Configuration options for the analysis Standard to test against:
"WCAG2A" - WCAG 2.0 Level A
"WCAG2AA" - WCAG 2.0 Level AA
"WCAG2AAA" - WCAG 2.0 Level AAA
"WCAG21A" - WCAG 2.1 Level A
"WCAG21AA" - WCAG 2.1 Level AA (default)
"WCAG21AAA" - WCAG 2.1 Level AAA
"Section508" - Section 508 compliance
Include warning-level issues that may need attention
Include notice-level issues (informational)
CSS selector for root element to test (tests entire page by default)
CSS selector for elements to hide during analysis
Browser behavior options CSS selector to wait for before analysis (useful for SPAs)
Milliseconds to wait before analysis (max 60,000ms)
Viewport dimensions Viewport height in pixels
Ignore HTTPS certificate errors (for local dev servers)
Response
Whether the analysis completed successfully
The analyzed URL or "[html content]"
Total number of issues found
List of accessibility issues Pa11y/HTML CodeSniffer rule identifier
Issue severity: "critical", "serious", "moderate", or "minor"
WCAG criterion details WCAG criterion number (e.g., "1.1.1", "2.4.7")
WCAG level: "A", "AA", or "AAA"
POUR principle: "perceivable", "operable", "understandable", or "robust"
WCAG version (e.g., "2.1")
Element location information Full CSS path to the element
HTML snippet of the element
Human-readable issue description from Pa11y
Enriched context explaining real-world impact with WCAG criterion details
User groups affected (e.g., "screen-reader", "low-vision", "cognitive")
Fix priority: "critical", "high", "medium", or "low"
Estimated effort: "low", "medium", or "high"
Aggregated statistics Issue counts by severity level {
"critical" : 0 ,
"serious" : 2 ,
"moderate" : 1 ,
"minor" : 0
}
Tool version and page metadata Pa11y version used for analysis
Title of the analyzed page
Analysis duration in milliseconds
Examples
Natural Language
JSON Input
With Warnings
Errors Only
WCAG AAA Level
Section 508 Compliance
Raw HTML Analysis
Analyze https://example.com with Pa11y
Response Example
{
"success" : true ,
"target" : "https://example.com" ,
"issueCount" : 3 ,
"issues" : [
{
"id" : "pa11y:WCAG2AA.Principle1.Guideline1_1.1_1_1.H37:8f3a2b" ,
"ruleId" : "WCAG2AA.Principle1.Guideline1_1.1_1_1.H37" ,
"tool" : "pa11y" ,
"severity" : "serious" ,
"wcag" : {
"criterion" : "1.1.1" ,
"level" : "AA" ,
"principle" : "perceivable" ,
"version" : "2.1"
},
"location" : {
"selector" : "html > body > img:nth-child(3)" ,
"snippet" : "<img src= \" banner.jpg \" >"
},
"message" : "Img element missing an alt attribute. Use the alt attribute to specify a short text alternative." ,
"humanContext" : "**Non-text content (WCAG 1.1.1 - Level A)** \n\n All non-text content must have a text alternative that serves the equivalent purpose." ,
"affectedUsers" : [ "screen-reader" , "low-vision" ],
"priority" : "critical" ,
"remediationEffort" : "low" ,
"confidence" : 1
}
],
"summary" : {
"total" : 3 ,
"bySeverity" : {
"critical" : 0 ,
"serious" : 2 ,
"moderate" : 1 ,
"minor" : 0
}
},
"metadata" : {
"toolVersion" : "9.0.1" ,
"pageTitle" : "Example Domain"
},
"duration" : 1890
}
Use Cases
Section 508 Compliance (Government Sites)
Check https://government-site.gov for Section 508 compliance using Pa11y
Government websites must comply with Section 508 standards.
WCAG AAA Validation
Analyze https://example.com with Pa11y at WCAG 2.1 AAA level
Validate against the highest WCAG conformance level.
Cross-validation with axe-core
Analyze https://example.com with both axe-core and Pa11y to compare results
Use both tools to catch more issues and reduce false positives.
{
"url" : "https://example.com" ,
"options" : {
"hideElements" : ".third-party-chat, #ads-container"
}
}
Exclude third-party content you don’t control from analysis.
Pa11y uses full CSS paths in selectors (e.g., html > body > div > img), which are more precise than axe-core’s compact selectors but can be verbose.
Differences from axe-core
Feature axe-core Pa11y Engine Deque axe-core HTML CodeSniffer Selector format Compact CSS Full CSS path False positives Few Moderate Speed ~2-3s ~2s Standards WCAG 2.0/2.1 WCAG 2.0/2.1, Section 508 Section 508 ✗ ✓
Pa11y may report more false positives than axe-core. Always manually verify issues, especially warnings and notices.
analyze-with-axe Alternative engine with low false positive rate
analyze-mixed Run Pa11y and axe-core together for maximum coverage
analyze-with-lighthouse Get an accessibility score with Lighthouse
Quick Accessibility Check Fast sanity check workflow