# Website Accessibility Checker - WCAG 2.2 & EAA (`psx/accessibility-eaa-audit`) Actor

Bulk WCAG 2.2 audit in a real browser, mapped to EN 301 549 (European Accessibility Act). Per-page score, selectors and fix hints. No certification.

- **URL**: https://apify.com/psx/accessibility-eaa-audit.md
- **Developed by:** [psx](https://apify.com/psx) (community)
- **Categories:** E-commerce, Business, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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

## Website Accessibility Audit - WCAG 2.2 + European Accessibility Act (EN 301 549) checker

Audit any public web page with [axe-core](https://github.com/dequelabs/axe-core) in a real Chromium browser (JavaScript executed, so SPAs work). Every finding is mapped to its **WCAG success criterion** and the matching **EN 301 549 clause**, the harmonised standard behind the **European Accessibility Act (EAA)**, in force since 28 June 2025.

### Use cases

- **EAA readiness checks** for e-shops, SaaS and agencies selling into the EU.
- **Agency prospecting and client reports** - batch hundreds of domains, sort by score.
- **CI / monitoring** - run on a schedule through the Apify API, alert when issues appear.
- **AI agents (MCP)** - one structured JSON record per page, with selectors and fix hints.

### Input

| Field | Default | Description |
|---|---|---|
| `urls` | required | Up to 500 pages or bare domains. |
| `wcagLevel` | `AA` | `A`, `AA` or `AAA`. AA is what EN 301 549 requires. |
| `maxPagesPerSite` | `1` | >1 also audits same-site pages linked from the start page (one level, robots.txt respected). |
| `includeBestPractices` | `false` | Add axe best-practice rules. |
| `includeIncomplete` | `false` | Add `needsManualReview` items. |
| `maxExamplesPerIssue` | `3` | Failing elements shown per rule. |
| `viewportWidth` | `1280` | Use 375 for mobile. |
| `concurrency` / `delaySecs` | `2` / `2` | Polite defaults; same-site pages are spaced by `delaySecs`. |
| `respectRobots` | `true` | Skip pages disallowed for this bot. |

```json
{ "urls": ["https://example.com"], "wcagLevel": "AA", "maxPagesPerSite": 5 }
```

### Output (one item per page)

```json
{
  "url": "https://www.w3.org/WAI/demos/bad/before/home.html",
  "status": 200, "lang": "en", "score": 60,
  "summary": { "violatedRules": 6, "affectedElements": 46, "byImpact": { "critical": 2, "serious": 4, "moderate": 0, "minor": 0 } },
  "violations": [{
    "id": "image-alt", "impact": "critical", "description": "Images must have alternative text",
    "wcagCriteria": ["1.1.1"], "wcagLevel": "A", "en301549": ["9.1.1.1"], "nodeCount": 12,
    "examples": [{ "selector": "img[src=\"logo.png\"]", "html": "<img src=...>", "fix": "Fix any of the following: ..." }]
  }],
  "note": "Automated testing detects roughly 30-40% of WCAG issues ..."
}
```

`score` is a simple heuristic (100 minus weighted violated rules), useful for ranking, not an official metric.

### Important limits (honest disclaimer)

Automated tools find about 30-40% of accessibility problems. A clean result is **not** proof of conformance with WCAG, EN 301 549 or the EAA, and this is not legal advice. WCAG 2.2-only criteria have no EN 301 549 clause yet (v3.2.1 is based on WCAG 2.1) and show `en301549` empty.

### Pricing (pay per event)

| Event | When charged | Price |
|---|---|---|
| `apify-actor-start` | once per run | $0.005 |
| `page-audited` | each page successfully audited | $0.015 (= $15 per 1,000 pages) |

**Why this price:** each page runs in real Chromium (JavaScript executed), which costs far more compute than HTTP-only checks. Cheap actors in the Store charge $2-$30 per 1,000 pages (some with weaker output), and the biggest named scanners charge $25-$200 per 1,000. We price at the lower-middle with the EN 301 549 / EAA mapping as the differentiator. Example: 100 sites x 1 page = $1.50; 100 sites x 5 pages = $7.50. A manual audit costs from $499 and SaaS scanners about $19/month, so this is a cheap triage step.

### Politeness and safety

- Identifies as `A11yEaaAudit`, respects robots.txt, max 5 browser pages, per-site delay.
- Only http/https; localhost, internal hosts and private/reserved IPs are blocked (also for sub-requests).
- Audits only public, unauthenticated pages. Output contains page HTML snippets of failing elements only.

### FAQ

**Does a clean result mean I comply with the EAA?**\
No. Automated testing finds roughly 30-40% of WCAG issues. Use this for triage and monitoring, then add manual testing. Not legal advice.

**Who has to comply with the European Accessibility Act?**\
Since 28 June 2025 many consumer-facing digital products and services sold in the EU (e-commerce, banking, transport, e-books, telecom) must be accessible. Microenterprises providing services are exempt. Check with a lawyer for your case.

**What is EN 301 549?**\
The harmonised European standard that gives presumption of conformity with the EAA. v3.2.1 is based on WCAG 2.1 AA, so WCAG 2.2-only criteria show an empty `en301549` list.

**Can it audit many pages per site?**\
Yes, `maxPagesPerSite` follows same-site links one level deep and respects robots.txt.

**Can it audit pages behind a login?**\
No. Public, unauthenticated pages only.

### Part of the Site Audit Suite

Run the same list of domains through every audit:

- [Website Tech Stack Detector](https://apify.com/psx/tech-stack-detector)
- [Security Headers + TLS Audit](https://apify.com/psx/security-headers-tls-audit)
- [Broken Link Checker + On-Page SEO Audit](https://apify.com/psx/broken-link-seo-audit)
- llms.txt Generator and Sitemap + robots.txt Analyzer (coming soon)

Tip: pipe one domain list into several actors with an Apify Task or the API and join the results by `url`.

### Develop

```bash
npm install && npm test
mkdir -p storage/key_value_stores/default
echo '{"urls":["https://example.com"]}' > storage/key_value_stores/default/INPUT.json
npm start        # results in storage/datasets/default/ (needs: npx playwright install chromium)
docker build -t a11y-eaa-audit .
```

Deploy (needs Apify account): `npx apify-cli login && npx apify-cli push`.

### Verified (2026-10-05, local)

Run on w3.org BAD demo (score 60, 6 rules), example.com (100), bbc.com + subpage (90/95); Docker image builds and runs (`docker run --user 996 -v <dir>:/home/myuser/storage`).

# Actor input Schema

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

Pages or domains to audit (up to 500). Bare domains like example.com are accepted.

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

Rules up to this level are tested. AA is the level required by EN 301 549 / the European Accessibility Act.

## `maxPagesPerSite` (type: `integer`):

1 = audit only the given URLs. Higher values also audit same-site pages linked from the start page (one level deep, robots.txt respected). Each audited page is billed.

## `includeBestPractices` (type: `boolean`):

Also run axe best-practice rules that are not WCAG criteria.

## `includeIncomplete` (type: `boolean`):

Add checks axe could not decide automatically (e.g. contrast over images) as needsManualReview.

## `maxExamplesPerIssue` (type: `integer`):

How many failing elements (selector, HTML, fix hint) to include per rule.

## `viewportWidth` (type: `integer`):

Browser width. Use 375 to audit the mobile layout.

## `concurrency` (type: `integer`):

Parallel browser pages overall (max 5). Pages of one site are always spaced by the delay below.

## `delaySecs` (type: `integer`):

Politeness delay for requests to the same domain.

## `respectRobots` (type: `boolean`):

Skip pages disallowed by robots.txt for this bot.

## Actor input object example

```json
{
  "urls": [
    "https://www.w3.org/WAI/demos/bad/before/home.html"
  ],
  "wcagLevel": "AA",
  "maxPagesPerSite": 1,
  "includeBestPractices": false,
  "includeIncomplete": false,
  "maxExamplesPerIssue": 3,
  "viewportWidth": 1280,
  "concurrency": 2,
  "delaySecs": 2,
  "respectRobots": true
}
```

# Actor output Schema

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

No description

# 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 = {
    "urls": [
        "https://www.w3.org/WAI/demos/bad/before/home.html"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("psx/accessibility-eaa-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 = { "urls": ["https://www.w3.org/WAI/demos/bad/before/home.html"] }

# Run the Actor and wait for it to finish
run = client.actor("psx/accessibility-eaa-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 '{
  "urls": [
    "https://www.w3.org/WAI/demos/bad/before/home.html"
  ]
}' |
apify call psx/accessibility-eaa-audit --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,psx/accessibility-eaa-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/HR2mOwIVN6PHyShjz/builds/K8PWz3qqWSmXjXEY2/openapi.json
