# WCAG Accessibility Audit (`mikee368/wcag-accessibility-audit`) Actor

One axe-core report per public https page, with a 0-100 score and WCAG 2.2 tags. Automated check only. Not a WCAG, ADA, Section 508, or European Accessibility Act certification, and not a manual audit. Only a completed report is charged.

- **URL**: https://apify.com/mikee368/wcag-accessibility-audit.md
- **Developed by:** [Mike Berckmoes](https://apify.com/mikee368) (community)
- **Categories:** Automation, Other
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$22.00 / 1,000 page auditeds

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 Audit

**An automated axe-core check of public https pages. This is not a WCAG, ADA, Section 508, or European Accessibility Act (EAA) certification, and it does not replace a manual audit.**

For each URL the Actor opens the page in headless Chromium, runs [axe-core](https://github.com/dequelabs/axe-core) 4.10.3, and stores one row. It does not log in, submit forms, or POST to the site being audited.

axe-core is Mozilla Public License 2.0. The image build downloads the npm tarball `axe-core-4.10.3.tgz` and checks sha256 `0f2b4d7dcdf7d1219df8d1959ad68e565f51d14c3f0d88bb71cd59abeb956292` before copying `axe.min.js` and its `LICENSE` into the image. MPL-2.0 covers the checker. It does not certify the pages this Actor scans.

### What you get (one row per page)

| Field | What it means |
|---|---|
| `status` | `ok`, `blocked`, `robots_disallowed`, `non_html`, `failed`, or `invalid`. Only `ok` is charged |
| `score` | 0–100 from the formula below. Empty when axe-core did not finish |
| `violationsCount` | Failing nodes in `critical`, `serious`, `moderate`, and `minor` |
| `violations[]` | `ruleId`, `impact`, `wcagTags`, `helpUrl`, and `nodes` (selectors plus a short `failureSummary`) |
| `passesCount`, `incompleteCount` | axe-core totals. Incomplete checks do not change the score |
| `newViolations` | In watch mode, true when a violation fingerprint is new for that URL. Null when watch is off. Not a separate charge |
| `disclaimer` | The row is an automated check, not a certification |

`wcagTags` keeps tags that start with `wcag` (for example `wcag2a`, `wcag22aa`, `wcag111`). Section 508 and EN 301 549 tags are not copied onto the row. The node `html` axe-core returns is not stored.

### How to use it

1. Paste public **https** page URLs into **Start URLs**. `https://example.com` is enough for a first run.
2. Or set a **Sitemap URL**. Those page URLs are added after the start URLs, up to **Max pages**.
3. Leave **WCAG level** at AA unless you want only A, or A+AA+AAA.
4. Choose **desktop** or **mobile**.
5. Leave **Respect robots.txt** on unless you control the site.
6. Run, then export the dataset. You can download it as JSON, CSV, HTML, or Excel. The key-value store holds `RUN_SUMMARY`.

```json
{
  "startUrls": ["https://example.com"],
  "maxPages": 1,
  "wcagLevel": "AA",
  "device": "desktop",
  "respectRobotsTxt": true,
  "watch": false
}
```

The Store example and the input prefill are that single public page. The Actor does not follow links, so one start URL is one page and finishes well under five minutes. Default memory is 2048 MB.

### How a run stays bounded

- One Chromium for the run. Each page creates its own browser context inside a try block, and that context is closed before the next page. If the browser crashes, it is launched once more for that page. A second crash is a free `failed` row. One page does not fail the run.
- The axe-core step is capped at 50 seconds. A timeout is a free `failed` row (`axe timed out`). Navigation itself stops at 20 seconds.
- After 15 consecutive `failed` or `blocked` pages the run stops. It also stops after 50 `failed` or `blocked` pages in total, even when successes break the streak. Rows already stored stay stored. The status message says which cap was hit. `robots_disallowed`, `non_html`, and `invalid` do not count toward either cap.
- Only `GET` and `HEAD` are allowed. Other methods are dropped, so a form is not submitted and the audited site is not posted to.
- Only public https URLs are requested. Userinfo, non-443 ports, and localhost are refused. A resolved address is refused unless `ip.is_global` is true, which rejects CGNAT `100.64.0.0/10` as well as private, loopback, and link-local addresses. Multicast is refused too.
- `maxPages` caps the combined list. Default 20, hard maximum 500. Start URLs come first, then sitemap URLs. A robots skip still uses one slot.
- Each navigation waits for `DOMContentLoaded` and then 250 ms. It does not wait for a quiet network.
- Desktop is 1280×800. Mobile is 390×844. The browser user agent and the robots.txt check use the same string for that device: `WcagAccessibilityAudit/0.1` on desktop, and the same string plus `Mobile` on a phone. That string names this Actor. Some sites refuse an honest bot user agent. Those responses are `blocked` or `failed` and are free. A redirect to another host loads that host's robots.txt before the next request.
- A `Disallow` match skips the page. 404 and 410 mean the host has no robots file. Any other robots failure, including an unreachable file, disallows the host for that run.
- There is a half-second pause between page fetches, or the robots `Crawl-delay` when it is longer, capped at 5 seconds.
- URLs already charged for this run id are not fetched or charged again if the run is migrated or resumed while it is still live. The list is its own key, `charged-<runId>`. When the run finishes, that key is deleted so old run ids do not pile up. A storage error on that delete is logged and does not fail the run. Watch fingerprints stay under `state-<watchId>` and are read or written only when watch mode is on, so a normal run cannot wipe that history. If either record would exceed 9 MB it is trimmed, or skipped with a warning, and the run still finishes.

### Pricing

Live pay-per-event price on mikee368/wcag-accessibility-audit (KVNEqi8tEqmrLvgh8): **$0.022** per `page-audited`.

One charge per completed axe-core report, and only once that row has been stored. There is **no start fee**. `pricing.json` does not price `apify-actor-start` or `apify-default-dataset-item`, so a row is not billed twice.

These pages are stored and **not** charged:

- `blocked` (HTTP 401, 403, 407, 429, or 451)
- `robots_disallowed`
- `non_html` (PDF, image, JSON, and any other non-HTML response)
- `failed` (timeouts, other HTTP errors, a checker that did not run)
- `invalid` (not a public https URL)
- `already_charged` (this run id already paid for that URL)

| Pages with a completed report | Charge |
|---|---|
| 1 (the example, `https://example.com`) | $0.022 |
| 20 (the default cap) | $0.44 |
| 500 (the hard cap) | $11.00 |

Failures in the same run add no event charge. The minimum charge cap in the live price is $0.022, so a buyer cannot cap a run below one completed page.

### Score

The score starts at **100**. It uses the failing nodes stored on the row (at most 8 per rule):

| Impact | Points per node |
|---|---|
| critical | −10 |
| serious | −5 |
| moderate | −2 |
| minor | −1 |

`score = max(0, 100 − 10×critical − 5×serious − 2×moderate − 1×minor)`.

A page with no violations scores 100. Incomplete axe-core results, including checks the tool could not decide, do not change the score. Passes do not add points. The score is not a conformance level.

Two critical nodes, which is what a page with a missing image description and an empty button produces under axe-core 4.10, score 80.

### WCAG tags

| Level | axe-core tags |
|---|---|
| A | `wcag2a`, `wcag21a`, `wcag22a` |
| AA | A, plus `wcag2aa`, `wcag21aa`, `wcag22aa` |
| AAA | AA, plus `wcag2aaa`, `wcag21aaa`, `wcag22aaa` |

AA is the default. These are WCAG 2.0, 2.1, and 2.2 tags that axe-core 4.10 knows. They are not a statement that the page conforms.

### Watch mode

Turn on **Watch** to compare this run with the last saved result for the same **Watch ID**. Fingerprints (`ruleId` plus the target selector) are kept in the named key-value store `wcag-accessibility-audit-state`, under `state-<watchId>`. That record is left alone when watch mode is off. Charged URLs for the current run id are a separate key, `charged-<runId>`, removed when the run finishes.

- `newViolations` is true when a completed report has at least one fingerprint that was not stored for that URL last time.
- It is false when every current fingerprint was already stored, including a page that is still clean.
- It is null when watch is off, or when this row is not a completed axe report.

The flag is part of the row. It is not its own charge. A completed report is still `page-audited` at $0.022. The first watch run has no previous result, so any current violation is new.

Use a different Watch ID when two schedules should not share state.

### Webhook

If you set a public https **Webhook URL**, each stored row is POSTed as JSON. The call times out after 5 seconds. Redirects are not followed. After 3 failed calls the webhook is turned off for the rest of the run. A failed webhook is recorded on `RUN_SUMMARY` and does not fail the run. The URL is not written to the log. The audited site is never the webhook target.

### Output example

```json
{
  "url": "https://example.com/",
  "finalUrl": "https://example.com/",
  "status": "ok",
  "httpStatus": 200,
  "score": 80,
  "violationsCount": {"critical": 2, "serious": 0, "moderate": 0, "minor": 0},
  "violations": [
    {
      "ruleId": "image-alt",
      "impact": "critical",
      "wcagTags": ["wcag2a", "wcag111"],
      "helpUrl": "https://dequeuniversity.com/rules/axe/4.10/image-alt",
      "nodes": [
        {"target": ["img"], "failureSummary": "Fix any of the following: Element does not have an alt attribute"}
      ]
    }
  ],
  "passesCount": 6,
  "incompleteCount": 1,
  "newViolations": null,
  "auditedAt": "2026-11-20T12:00:00Z",
  "wcagLevel": "AA",
  "device": "desktop",
  "error": null,
  "disclaimer": "This is an automated check, not a WCAG, ADA, Section 508, or European Accessibility Act certification, and it does not replace a manual audit."
}
```

### Limitations

- A manual audit covers keyboard use, meaning, timing, and content that axe-core does not decide. This Actor does not.
- A login wall is reported as whatever the logged-out page shows. The Actor does not type, click submit, or post credentials.
- The check runs after `DOMContentLoaded` plus a short wait. Content that appears later can be missed.
- Color contrast and other incomplete axe-core rules are counted in `incompleteCount` only.
- An unreachable robots.txt blocks the host while respect robots.txt is on. That follows the same rule as a robots file that cannot be read.
- http URLs, private hosts, and addresses with a username or a non-443 port are `invalid` and are not fetched.
- Do not treat the score, the tags, or a row with zero violations as a legal or conformance certificate.

### FAQ

#### Is this a WCAG or ADA certification?

No. It is an automated axe-core report. It is not a WCAG, ADA, Section 508, or European Accessibility Act certification, and it does not replace a manual audit.

#### Why was a page free?

`blocked`, `robots_disallowed`, `non_html`, `failed`, `invalid`, and `already_charged` are not charged. Only `status: ok` charges `page-audited`. An axe timeout and a browser crash are `failed`.

#### Does watch mode cost extra?

No. `newViolations` is a field on the row. The completed report is still one `page-audited` event.

# Actor input Schema

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

Public https pages to audit. The Actor does not follow links, log in, or submit forms. One URL, such as https://example.com, is a complete first run.

## `sitemapUrl` (type: `string`):

Optional public https sitemap (urlset or one index level). Page URLs are taken in order after startUrls. http addresses in the sitemap are skipped.

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

Hard cap on the combined start URL and sitemap list. Default 20, maximum 500. A URL that robots.txt later skips still uses one slot. The example run audits one page.

## `wcagLevel` (type: `string`):

axe-core tags for WCAG 2.2 at this level. AA includes the A tags. AAA includes A and AA. This is a rule filter, not a conformance claim.

## `device` (type: `string`):

Desktop is a 1280x800 viewport. Mobile is 390x844 with a phone user agent.

## `respectRobotsTxt` (type: `boolean`):

On by default. A matching Disallow skips the page and is not charged. 404 or 410 allows the host. An unreachable robots.txt, or any status other than 200, 404, or 410, disallows the host. Turn this off only for a site you control.

## `webhookUrl` (type: `string`):

Optional public https URL. Each stored row is POSTed as JSON. Redirects are not followed. A webhook failure does not fail the run. Nothing is posted to the audited site.

## `watch` (type: `boolean`):

Store violation fingerprints for this watchId and set newViolations on each completed report. The flag is included in the row and is not a separate charge. The page is still charged when the axe report is stored.

## `watchId` (type: `string`):

Separates saved results when more than one watch uses this Actor. Letters, numbers, dots, underscores, and hyphens, up to 64 characters.

## Actor input object example

```json
{
  "startUrls": [
    "https://example.com"
  ],
  "sitemapUrl": "",
  "maxPages": 20,
  "wcagLevel": "AA",
  "device": "desktop",
  "respectRobotsTxt": true,
  "webhookUrl": "",
  "watch": false,
  "watchId": "default"
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset with one row per page

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

Counts, the disclaimer, and the pay-per-event charge

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

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

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

```

## MCP server setup

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

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/KVNEqi8tEqmrLvgh8/builds/CMIPUBMLM2WaUgv44/openapi.json
