# WCAG Accessibility Auditor — axe-core Site Scan (`perryay/wcag-accessibility-auditor`) Actor

Enterprise-grade WCAG 2.1/2.2 auditor via axe-core headless Chromium. Single-page, multi-URL batch, and same-domain crawl with EN 301 549 mapping and prioritized remediation reports. Per-page charging on success only. Ideal for EAA compliance and accessibility monitoring.

- **URL**: https://apify.com/perryay/wcag-accessibility-auditor.md
- **Developed by:** [Perry AY](https://apify.com/perryay) (community)
- **Categories:** SEO tools, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.015 / actor start

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## WCAG Accessibility Auditor ♿ — axe-core Site Scan

**Automated WCAG 2.1/2.2 accessibility audits powered by the industry-standard axe-core engine, with EN 301 549 clause mapping and prioritized remediation reports for European Accessibility Act compliance.**

The European Accessibility Act (EAA) has been enforceable across the EU since **2025-06-28**, and most digital products must now demonstrably meet **EN 301 549** (which incorporates **WCAG 2.1 AA**). This actor runs the same axe-core engine used by browser accessibility tools inside headless Chromium via Playwright, audits single pages, batches of URLs on any domain, or entire sites via a same-domain crawl, and returns machine-readable findings mapped to EN 301 549 clauses — plus a prioritized remediation report that tells you what to fix first.

***

### ✨ Features

- **Real axe-core, vendored.** Ships axe-core 4.10.0 inside the actor image — no CDN dependency at runtime, consistent results run over run.
- **Three audit modes.** `single-page` for a quick check, `multi-url` for batches across any domain, and `site-crawl` for a breadth-first, same-domain walk of up to 50 pages.
- **WCAG 2.1 A/AA by default, WCAG 2.2 AA optional.** Runs `wcag2a`, `wcag2aa`, `wcag21a`, `wcag21aa` and `best-practice` tags out of the box; flip `include_wcag22` to add `wcag22a`/`wcag22aa`.
- **EN 301 549 clause mapping.** Every finding row carries an `en301549_clause` (e.g. `color-contrast` → `1.4.3`) so results slot straight into EAA compliance evidence. Rules without a defensible mapping honestly report `null`.
- **Prioritized remediation report.** Top 5 rules ranked by impact weight × occurrence count, with fix guidance taken from axe-core's own help text.
- **Impact-bucketed summary.** Violations rolled up by critical / serious / moderate / minor, plus unique-rule counts, in a final summary row.
- **Resilient by design.** Per-page error isolation (`asyncio.gather(..., return_exceptions=True)`), configurable post-load waits for SPAs, and billing that never charges for pages that error.

### 🚀 Quick Start

1. Open the actor on the Apify Store and click **Start a free trial** (or use your API token).
2. Choose a mode — the console is pre-filled with a single-page audit of `https://example.com`.
3. (Optional) For a full site audit, switch **Mode** to `site-crawl`, set **Crawl Start URL** to your site root, and raise **Max Pages to Crawl**.
4. Click **Run** and open the **Dataset** tab: finding rows, page rows, the remediation row, and the summary row are written as the run progresses.
5. Export the dataset (JSON/CSV/Excel) for your VPAT, accessibility statement, or ticketing system.

### Input Parameters

| Field | Type | Required | Default | Description |
|-------|------|----------|---------|-------------|
| `mode` | string | No | `"single-page"` | Operating mode: `single-page`, `multi-url`, or `site-crawl`. |
| `urls` | array of strings | No | `[]` | URLs to audit. `single-page` uses `urls[0]`; `multi-url` audits all (any domain). Scheme may be omitted (https assumed). |
| `start_url` | string | No | — | Starting URL for `site-crawl` (BFS stays on the same domain). |
| `max_pages` | integer | No | `10` | Max pages crawled and audited in `site-crawl` mode (1–50). |
| `tags` | array of strings | No | `["wcag2a","wcag2aa","wcag21a","wcag21aa","best-practice"]` | axe-core rule tags to run. Leave empty for defaults. |
| `include_wcag22` | boolean | No | `false` | Add `wcag22a` and `wcag22aa` tags (WCAG 2.2 AA). |
| `include_passes` | boolean | No | `false` | Count passing rules per page (reported on the page row only). |
| `include_incomplete` | boolean | No | `false` | Count "incomplete" rules that need manual review. |
| `en301549` | boolean | No | `true` | Add `en301549_clause` to every finding row (EN 301 549 mapping). |
| `generate_remediation_report` | boolean | No | `true` | Emit the prioritized remediation row (top 5 rules). |
| `wait_ms` | integer | No | `2000` | Milliseconds to wait after load before running axe (raise for SPAs/lazy content). |
| `page_timeout_ms` | integer | No | `30000` | Navigation timeout per page in ms (5000–600000). |
| `max_concurrency` | integer | No | `3` | Concurrent page audits (1–10). Used in `multi-url` batches and each crawl wave. |

#### Example input

```json
{
  "mode": "site-crawl",
  "start_url": "https://example.com",
  "max_pages": 25,
  "include_wcag22": true,
  "en301549": true,
  "wait_ms": 3000
}
```

### Output Format

The dataset contains four row types, pushed live as the run progresses.

**Finding row** — one per violated rule instance per DOM node:

```json
{
  "type": "finding",
  "url": "https://example.com",
  "page_title": "Example Domain",
  "rule_id": "color-contrast",
  "impact": "serious",
  "description": "Elements must have sufficient color contrast",
  "help": "Elements must have sufficient color contrast",
  "help_url": "https://dequeuniversity.com/rules/axe/4.10/color-contrast",
  "wcag_criteria": ["wcag2aa", "wcag21aa"],
  "en301549_clause": "1.4.3",
  "node_target": "html > body > div > p.lead",
  "html_snippet": "<p class=\"lead\">Example text...</p>",
  "failure_summary": "Fix any of the following: Element has insufficient color contrast..."
}
```

**Page row** — one per audited (or failed) page; `passes`/`incomplete` are `null` unless opted in:

```json
{
  "type": "page",
  "url": "https://example.com",
  "title": "Example Domain",
  "violations": 3,
  "passes": null,
  "incomplete": null,
  "error": null
}
```

**Remediation row** — emitted once per run when `generate_remediation_report` is true:

```json
{
  "type": "remediation",
  "generated_at": "2025-07-01T12:00:00+00:00",
  "total_findings": 42,
  "unique_rules": 7,
  "top_rules": [
    {
      "rule_id": "color-contrast",
      "impact": "serious",
      "occurrences": 18,
      "en301549_clause": "1.4.3",
      "fix_guidance": "Elements must have sufficient color contrast",
      "help_url": "https://dequeuniversity.com/rules/axe/4.10/color-contrast"
    }
  ],
  "note": "Top 5 rules ranked by impact weight x occurrence count; fix guidance from axe-core help text."
}
```

**Summary row** — always the last row:

```json
{
  "type": "summary",
  "pages_audited": 10,
  "pages_failed": 1,
  "total_violations": 27,
  "by_impact": {"critical": 2, "serious": 11, "moderate": 9, "minor": 5},
  "unique_rules": 6
}
```

### API Usage

#### cURL

```bash
curl -X POST \
  "https://api.apify.com/v2/acts/perryay~wcag-accessibility-auditor/runs?token=<YOUR_API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "mode": "multi-url",
    "urls": ["https://example.com", "https://example.com/about"],
    "en301549": true
  }'
```

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")

run = client.actor("perryay~wcag-accessibility-auditor").call(
    run_input={
        "mode": "single-page",
        "urls": ["https://example.com"],
        "include_wcag22": False,
        "wait_ms": 2000,
    },
)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["type"], item.get("rule_id") or item.get("url"))
```

### Use Cases

1. **EAA compliance quarterly audits.** The European Accessibility Act has been enforceable since 2025-06-28 — schedule this actor quarterly to keep dated evidence of your WCAG 2.1 AA posture and EN 301 549 clause coverage.
2. **Pre-launch accessibility gates.** Run the actor in CI or as a deploy check on staging: a rise in critical/serious findings blocks the release.
3. **Procurement VPAT evidence.** The finding rows and EN 301 549 clause mapping feed directly into VPAT/ACR documentation for enterprise sales.
4. **Public sector monitoring.** Public bodies must meet accessibility obligations; crawl department sites on a schedule and diff the summary rows over time.
5. **Developer PR checks.** Point `single-page` at a preview deployment URL for each pull request and attach the remediation row to the PR.

### MCP Integration

WCAG Accessibility Auditor is available as a remote MCP server. Connect with OAuth using a URL-only configuration — no client ID or secret needed in the client config:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com"
    }
  }
}
```

Alternatively, authenticate with a Bearer token:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com",
      "headers": {
        "Authorization": "Bearer YOUR_APIFY_TOKEN"
      }
    }
  }
}
```

Example prompts:

1. "Audit https://example.com for WCAG 2.1 AA violations and give me the top 3 rules to fix"
2. "Crawl https://example.com up to 10 pages and produce a prioritized remediation report with EN 301 549 clause mapping"

On first connection, your browser opens to sign in to Apify and authorize access.

Learn more: https://mcp.apify.com and https://docs.apify.com/integrations/mcp

### FAQ

1. **What is axe-core and why does this actor use it?** axe-core is the industry-standard open-source accessibility testing engine (by Deque Systems) embedded in browser DevTools, Lighthouse, and most professional audit tooling. This actor vendors axe-core 4.10.0 so results match what your team already trusts.
2. **Which WCAG versions are covered?** By default: WCAG 2.0 A/AA and WCAG 2.1 A/AA (tags `wcag2a`, `wcag2aa`, `wcag21a`, `wcag21aa`) plus `best-practice`. Enable `include_wcag22` to add WCAG 2.2 A/AA rules.
3. **Does automated testing make my site compliant?** No — honest limit: automated tools like axe-core catch roughly **30–50% of accessibility issues**. Things like keyboard-only usability, meaningful reading order, alt-text quality, and cognitive accessibility need human evaluation. Use this actor as a fast, repeatable first pass, not a certification.
4. **Why does a page show zero violations but still has problems?** axe-core only reports what is statically detectable in the DOM at audit time. Manual testing is still required for the rest — see the previous answer.
5. **What do the impact levels mean?** axe-core classifies violations as `critical`, `serious`, `moderate`, or `minor` based on how severely they block users. The summary row buckets findings accordingly and the remediation report ranks rules by impact × frequency.
6. **What is EN 301 549 and why is the clause mapping useful?** EN 301 549 is the European standard for ICT accessibility that the EAA references; its web clauses mirror WCAG 2.1 AA (e.g. clause 1.4.3 = contrast). The mapping turns raw axe findings into standard-specific evidence for regulators and procurement.
7. **What happens with axe rules that have no EN 301 549 equivalent?** The finding's `en301549_clause` is `null` — we never invent a mapping. This is intentional so your compliance evidence stays defensible.
8. **Why are some pages marked as errors?** Navigation timeouts, DNS failures, bot-blocking (403/503), non-HTML responses, or pages where axe-core could not initialise. Error pages get a `page` row with the `error` field set and are never billed.
9. **How does `site-crawl` decide which pages to visit?** Breadth-first from `start_url`, collecting `a[href]` links, absolutising them, stripping fragments, and keeping only same-domain (same netloc) http(s) URLs — up to `max_pages`.
10. **Can it audit pages behind a login?** No — the actor audits public pages only. Authenticated/behind-SSO audits are out of scope (honest limit).
11. **My site is a SPA and results look incomplete.** Raise `wait_ms` (e.g. 5000–10000) so client-side rendering finishes before axe runs. axe audits the DOM as it exists at that moment.
12. **Can I audit pages on different domains in one run?** Yes — `multi-url` mode accepts any domains. `site-crawl` deliberately stays on one domain.
13. **How do I reduce noise from decorative or off-screen content?** Combine `tags` (restrict to the WCAG levels you care about) with `include_incomplete` to also surface "needs manual review" items in the page rows.
14. **How is billing computed for failed pages?** It isn't. Only successfully audited pages trigger `page-audit`/`site-crawl` charges; error rows are free.
15. **Is my data private?** Audits run on Apify infrastructure; only the public HTML of the pages you submit is processed. Results land in your dataset.

# Changelog

This Actor's version history is a separate document: https://apify.com/perryay/wcag-accessibility-auditor/changelog.md

# Actor input Schema

## `mode` (type: `string`):

Operating mode: 'single-page' audits one URL (urls\[0]); 'multi-url' audits an array of URLs on any domain; 'site-crawl' BFS-crawls start_url on the same domain up to max_pages.

## `urls` (type: `array`):

List of URLs to audit. In 'single-page' mode only the first entry (urls\[0]) is used. In 'multi-url' mode all entries are audited across any domain. Each entry may omit the scheme (https:// is assumed).

## `start_url` (type: `string`):

Starting URL for 'site-crawl' mode. The crawler stays on the same domain (same netloc) and follows links breadth-first up to max_pages.

## `max_pages` (type: `integer`):

Maximum number of pages to crawl and audit in 'site-crawl' mode. Range 1-50.

## `tags` (type: `array`):

axe-core tags to run (runOnly.type='tag'). Defaults to WCAG 2.1 A/AA plus best-practice: \["wcag2a","wcag2aa","wcag21a","wcag21aa","best-practice"]. Leave empty to use defaults. WCAG 2.2 tags are added via include_wcag22.

## `include_wcag22` (type: `boolean`):

Add wcag22a and wcag22aa rule tags to the audit (WCAG 2.2 AA success criteria such as focus-not-obscured and target-size).

## `include_passes` (type: `boolean`):

Also compute axe 'passes' results and report the count on each page row (passes are not emitted as finding rows).

## `include_incomplete` (type: `boolean`):

Also compute axe 'incomplete' results (needs manual review) and report the count on each page row.

## `en301549` (type: `boolean`):

Add an en301549_clause field to every finding row, mapping axe rules to EN 301 549 (European Accessibility Act harmonised standard) clauses. Unmapped rules get clause null.

## `generate_remediation_report` (type: `boolean`):

Emit a prioritized remediation row: top 5 rules ranked by impact weight x occurrence count, with fix guidance from axe-core help text.

## `wait_ms` (type: `integer`):

Milliseconds to wait after page load before running axe. Increase for SPAs or pages with lazy-loaded content so dynamic DOM is present. Range 0-300000.

## `page_timeout_ms` (type: `integer`):

Navigation timeout per page in milliseconds. Pages that exceed it are recorded as errors and never billed. Range 5000-600000.

## `max_concurrency` (type: `integer`):

Maximum number of pages audited concurrently (multi-url batches and each site-crawl wave). Range 1-10.

## Actor input object example

```json
{
  "mode": "single-page",
  "urls": [
    "https://example.com"
  ],
  "start_url": "https://example.com",
  "max_pages": 10,
  "tags": [
    "wcag2a",
    "wcag2aa",
    "wcag21a",
    "wcag21aa",
    "best-practice"
  ],
  "include_wcag22": false,
  "include_passes": false,
  "include_incomplete": false,
  "en301549": true,
  "generate_remediation_report": true,
  "wait_ms": 2000,
  "page_timeout_ms": 30000,
  "max_concurrency": 3
}
```

# Actor output Schema

## `results` (type: `string`):

All rows (findings, pages, remediation, summary) in the default dataset

## `summary` (type: `string`):

Final summary row: pages audited/failed, total violations, impact breakdown, unique rules

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "mode": "single-page",
    "urls": [
        "https://example.com"
    ],
    "start_url": "https://example.com",
    "max_pages": 10,
    "wait_ms": 2000,
    "page_timeout_ms": 30000,
    "max_concurrency": 3
};

// Run the Actor and wait for it to finish
const run = await client.actor("perryay/wcag-accessibility-auditor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "mode": "single-page",
    "urls": ["https://example.com"],
    "start_url": "https://example.com",
    "max_pages": 10,
    "wait_ms": 2000,
    "page_timeout_ms": 30000,
    "max_concurrency": 3,
}

# Run the Actor and wait for it to finish
run = client.actor("perryay/wcag-accessibility-auditor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "mode": "single-page",
  "urls": [
    "https://example.com"
  ],
  "start_url": "https://example.com",
  "max_pages": 10,
  "wait_ms": 2000,
  "page_timeout_ms": 30000,
  "max_concurrency": 3
}' |
apify call perryay/wcag-accessibility-auditor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,perryay/wcag-accessibility-auditor"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/yzt5zcE96Jgl8CAOg/builds/04VZVT21gSlWCsBg9/openapi.json
