# WCAG Accessibility Scanner (`coolinbex/wcag-accessibility-scanner`) Actor

Scan websites for WCAG 2.0, 2.1, and 2.2 accessibility issues. Crawl multiple pages, detect actionable problems with axe-core, and export structured results plus JSON and HTML summaries.

- **URL**: https://apify.com/coolinbex/wcag-accessibility-scanner.md
- **Developed by:** [coolinbex](https://apify.com/coolinbex) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $6.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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 Scanner

Scan entire websites for **WCAG 2.0, 2.1, and 2.2 accessibility issues** with axe-core. Crawl multiple pages, find actionable accessibility problems, and export structured findings plus JSON and HTML summaries.

### What it detects

The Actor runs axe-core in a real Chromium browser and can identify issues such as:

- Missing or invalid image alternative text
- ARIA roles, attributes, and accessible-name problems
- Color contrast failures
- Missing form labels
- Invalid heading and landmark structures covered by axe rules
- Keyboard/accessibility-related rule failures detectable by automation
- Link and button naming problems
- Table, language, document structure, and semantic HTML issues
- Additional axe best-practice checks in **Comprehensive** mode

> Automated tools cannot prove WCAG conformance. Some accessibility requirements require manual testing with keyboard navigation, screen readers, zoom, reflow, cognitive review, and real user testing.

### Why use this Actor

- **Site-wide crawling** instead of checking one page at a time
- **WCAG 2.0 / 2.1 / 2.2 A + AA** profiles
- **Real browser rendering** for JavaScript-heavy sites
- **Confirmed violations + optional manual-review findings**
- **One result per rule per page** to keep the dataset clean and avoid duplicate-heavy output
- **Affected element samples** with selectors, HTML snippets, and failure summaries
- **JSON, CSV, Excel, XML, JSONL, and API exports** through the Apify dataset
- **HTML report + JSON summary** for each run
- Crawl depth, page limit, URL include/exclude patterns, concurrency, and dynamic-page wait controls
- Protection against localhost/private-network scanning and common crawl traps

### Input

A basic scan only needs a URL:

```json
{
  "startUrls": [{ "url": "https://example.com" }]
}
```

A larger WCAG 2.2 AA scan:

```json
{
  "startUrls": [{ "url": "https://example.com" }],
  "standard": "wcag22aa",
  "maxPages": 250,
  "maxDepth": 4,
  "sameDomainOnly": true,
  "includeSubdomains": false,
  "includeNeedsReview": true,
  "maxConcurrency": 5
}
```

#### WCAG profiles

| Value | Checks |
| --- | --- |
| `wcag2aa` | WCAG 2.0 Level A + AA |
| `wcag21aa` | WCAG 2.0 + 2.1 Level A + AA |
| `wcag22aa` | WCAG 2.0 + 2.1 + 2.2 Level A + AA |
| `comprehensive` | WCAG 2.2 A + AA plus axe best-practice rules |

### Output

Each dataset row represents **one accessibility rule on one page**:

```json
{
  "url": "https://example.com/contact",
  "pageTitle": "Contact",
  "issueType": "violation",
  "impact": "critical",
  "ruleId": "image-alt",
  "help": "Images must have alternative text",
  "description": "Ensure images have alternative text or a role of none or presentation",
  "helpUrl": "https://dequeuniversity.com/rules/axe/...",
  "wcagTags": ["wcag2a", "wcag111"],
  "allTags": ["cat.text-alternatives", "wcag2a", "wcag111"],
  "nodeCount": 3,
  "nodes": [
    {
      "target": ["img.hero"],
      "html": "<img class=\"hero\" src=\"hero.jpg\">",
      "failureSummary": "Fix any of the following..."
    }
  ],
  "scannedAt": "2026-09-18T12:00:00.000Z"
}
```

The run also stores:

- `SUMMARY.json` — totals, impact counts, unique rules, scanned pages, and failures
- `REPORT.html` — a simple human-readable run summary

### Result types

**`violation`** means axe-core found an automated rule failure.

**`needs-review`** means axe-core could not determine the result automatically and a person should review it. Disable these with `includeNeedsReview: false` if you only want confirmed automated violations.

### Crawl behavior

By default the Actor:

- stays on the starting hostname(s)
- scans up to 100 pages and 3 link levels
- removes query strings from **discovered** links to reduce duplicate/crawl-trap URLs
- skips common non-HTML file extensions
- removes URL fragments
- blocks localhost, link-local, private, reserved, and metadata network targets
- follows redirects while blocking redirects/subresources that attempt to reach private networks

Start URLs keep their query string, except common tracking parameters are removed.

### URL filters

Use simple `*` wildcards:

```json
{
  "includePatterns": ["*/blog/*", "*/products/*"],
  "excludePatterns": ["*/login*", "*/checkout/*"]
}
```

Filters apply to discovered links. Supplied start URLs are always scanned if they pass the public-URL safety checks.

### Recommended use cases

- Accessibility audits before release
- WCAG regression checks after deployments
- Agency QA across client websites
- Finding recurring accessibility defects across large sites
- CI/CD or scheduled accessibility monitoring with Apify Tasks and Schedules
- Producing structured accessibility data for dashboards and remediation workflows

### Technical stack

- Apify SDK
- Crawlee `PlaywrightCrawler`
- Chromium / Playwright
- Deque axe-core

The browser image and Playwright version are pinned for reproducible Apify builds.

### Limitations

- Automated testing finds only issues that can be reliably evaluated in software; manual accessibility testing is still necessary.
- Cross-origin or sandboxed iframes may not be fully inspectable.
- Authenticated/private applications require a separate authenticated workflow; this Actor intentionally blocks private-network targets.
- Visual states that only appear after complex interactions may require purpose-built interaction steps.

### Responsible scanning

Only scan websites you are authorized to test. Keep concurrency reasonable for the target website.

# Changelog

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

# Actor input Schema

## `startUrls` (type: `array`):

One or more public HTTP(S) pages to scan. Internal and private network targets are blocked for safety.

## `standard` (type: `string`):

Choose the accessibility ruleset to evaluate. Comprehensive also includes axe-core best-practice checks.

## `maxPages` (type: `integer`):

Maximum number of pages to scan across all supplied websites.

## `maxDepth` (type: `integer`):

Number of link levels to follow from each starting URL. Set to 0 to scan only the supplied URLs.

## `sameDomainOnly` (type: `boolean`):

Only crawl pages belonging to the domains supplied in Start URLs.

## `includeSubdomains` (type: `boolean`):

Allow subdomains such as blog.example.com when crawling example.com.

## `ignoreQueryParameters` (type: `boolean`):

Remove query strings from discovered links to reduce duplicate pages and crawl traps.

## `includePatterns` (type: `array`):

Optional wildcard URL patterns to include, for example */blog/* or */products/*. Leave empty to scan all eligible pages.

## `excludePatterns` (type: `array`):

Optional wildcard URL patterns to exclude, for example */login* or */checkout/*.

## `includeNeedsReview` (type: `boolean`):

Include axe-core incomplete results that require human review in addition to confirmed accessibility violations.

## `maxNodesPerRule` (type: `integer`):

Maximum number of affected element samples stored for each accessibility rule on each page.

## `pageLoadWaitMs` (type: `integer`):

Additional time to wait after the page loads before running accessibility checks. Useful for JavaScript-heavy websites.

## `navigationTimeoutSecs` (type: `integer`):

Maximum time allowed for loading each page.

## `maxConcurrency` (type: `integer`):

Maximum number of browser pages scanned simultaneously. Reduce this value for heavy websites or limited memory.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://example.com"
    }
  ],
  "standard": "wcag22aa",
  "maxPages": 100,
  "maxDepth": 3,
  "sameDomainOnly": true,
  "includeSubdomains": false,
  "ignoreQueryParameters": true,
  "includePatterns": [],
  "excludePatterns": [],
  "includeNeedsReview": true,
  "maxNodesPerRule": 10,
  "pageLoadWaitMs": 500,
  "navigationTimeoutSecs": 45,
  "maxConcurrency": 5
}
```

# Actor output Schema

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

Confirmed violations and optional manual-review findings in the default dataset.

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

Aggregate scan statistics and page-level status information.

## `report` (type: `string`):

Human-readable accessibility scan report.

# 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 = {
    "startUrls": [
        {
            "url": "https://example.com"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("coolinbex/wcag-accessibility-scanner").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 = { "startUrls": [{ "url": "https://example.com" }] }

# Run the Actor and wait for it to finish
run = client.actor("coolinbex/wcag-accessibility-scanner").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 '{
  "startUrls": [
    {
      "url": "https://example.com"
    }
  ]
}' |
apify call coolinbex/wcag-accessibility-scanner --silent --output-dataset

```

## MCP server setup

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

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/wLlGZFszRoNCUS8Bl/builds/T35saCz7nXGzscifF/openapi.json
