Skip to main content
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
string
required
URL of the page to analyze
Either url or html is required, but not both.
html
string
Raw HTML content to analyze (alternative to URL)Useful for analyzing HTML snippets or templates before deployment.
options
object
Configuration options for the analysis

Response

success
boolean
required
Whether the analysis completed successfully
target
string
required
The analyzed URL or "[html content]"
issueCount
number
required
Total number of issues found
issues
array
required
List of accessibility issues
summary
object
required
Aggregated statistics
metadata
object
Tool version and page metadata
duration
number
Analysis duration in milliseconds

Examples

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\nAll 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.

Hide Third-party Widgets

{
  "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

Featureaxe-corePa11y
EngineDeque axe-coreHTML CodeSniffer
Selector formatCompact CSSFull CSS path
False positivesFewModerate
Speed~2-3s~2s
StandardsWCAG 2.0/2.1WCAG 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

Build docs developers (and LLMs) love