# EAA & WCAG 2.2 Static HTML Accessibility Auditor (`strata-mcp/eaa-wcag-accessibility-auditor`) Actor

Ultra-lightweight static HTML accessibility auditor for EAA, EN 301 549, and WCAG 2.2. Supports single URLs and full-site bulk audits via sitemap.xml (up to 500 URLs, sitemapindex & .xml.gz) with zero browser overhead—built for AI agents (MCP) and automated pipelines.

- **URL**: https://apify.com/strata-mcp/eaa-wcag-accessibility-auditor.md
- **Developed by:** [Strata MCP](https://apify.com/strata-mcp) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00 / 1,000 audited urls

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

## EAA & WCAG 2.2 Static HTML Accessibility Auditor

Ultra-lightweight **European Accessibility Act (EAA)**, **EN 301 549**, and **WCAG 2.2 Level A/AA** static HTML accessibility screening Actor — powered purely by standard `fetch`, `cheerio`, and Node.js built-in modules (`zlib`).

Now with **Full-Site Bulk Audit via `sitemap.xml`**: automatically discover and audit up to **500 pages** in a single run from standard `<urlset>`, nested `<sitemapindex>`, and gzip-compressed `.xml.gz` sitemaps — with substring URL include/exclude filtering, automatic deduplication, and non-HTML asset exclusion.

Zero headless browser overhead (no Playwright/Puppeteer) and zero runtime LLM calls mean sub-second page audits, minimal memory footprint (`128–256 MB`), predictable **Pay-Per-Event (PPE)** billing, and clean structured JSON ready for **Apify Store**, automation pipelines, and **AI agents via Apify MCP**.

***

### Key Features & Use Cases

- **Full-Site Bulk Audit via `sitemap.xml`**: Point `sitemapUrl` at any site's `sitemap.xml` (including nested `<sitemapindex>` up to depth 2 / 20 child sitemaps and `.xml.gz` compressed sitemaps) to audit up to **500 pages** in one run. Filter target pages with `includeUrlPatterns` and `excludeUrlPatterns` while automatically skipping images, PDFs, ZIPs, and other non-HTML assets.
- **European Accessibility Act (EAA) Pre-Screening**: Rapidly screen e-commerce stores, banking/FinTech portals, SaaS marketing sites, and public web pages against key EN 301 549 / WCAG 2.2 static markup requirements.
- **AI Agents & MCP Workflows**: Connect directly to Claude, ChatGPT, or custom compliance agents via Apify MCP to obtain deterministic accessibility scores (`0–100`), risk grades, HTML snippets, and actionable English remediation steps.
- **Batch Portfolio Auditing**: Audit a single URL, a manual batch list of up to **500 URLs**, or a full `sitemap.xml` in seconds to prioritize remediation across multi-page sites, client portfolios, or competitor benchmarks.
- **Agency & Lead Generation Triage**: Quickly identify high-risk accessibility issues (missing `alt` text, disabled mobile zoom, unlabeled forms, empty links/buttons) without paying for heavy headless browser compute.

***

### What It Checks (9 Static HTML Rule Categories)

| # | Check Category | WCAG 2.2 Criterion | EN 301 549 Clause | Default Severity |
| --- | --- | --- | --- | --- |
| 1 | `<html lang="...">` presence & BCP 47 validity | `3.1.1` (A) | `9.3.1.1` | `serious` |
| 2 | `<title>` presence, non-empty & non-placeholder text | `2.4.2` (A) | `9.2.4.2` | `serious` / `minor` |
| 3 | Image `<img>` & `<input type="image">` `alt` attributes (`alt=""` respected for decorative images) | `1.1.1` (A) | `9.1.1.1` | `critical` / `minor` |
| 4 | Heading hierarchy (`<h1>` missing, multiple `<h1>`, skipped levels e.g. `h1 -> h3`, empty headings) | `1.3.1` (A) / `2.4.6` (AA) | `9.1.3.1` / `9.2.4.6` | `moderate` / `minor` |
| 5 | Form controls (`input`, `select`, `textarea`) programmatic label association (`<label for>`, wrapping `<label>`, `aria-label`, `aria-labelledby`) | `1.3.1` (A) / `3.3.2` (A) | `9.1.3.1` / `9.3.3.2` | `critical` |
| 6 | Empty links `<a href>` & empty buttons `<button>` (missing accessible name) | `2.4.4` (A) / `4.1.2` (A) | `9.2.4.4` / `9.4.1.2` | `serious` |
| 7 | Landmarks (`<main>`, `<nav>`, `<header>`, `<footer>` / ARIA roles) & Skip Link presence/target integrity | `1.3.1` (A) / `2.4.1` (A) | `9.1.3.1` / `9.2.4.1` | `moderate` / `minor` |
| 8 | Viewport zoom restriction (`user-scalable=no` / `0`, `maximum-scale < 2.0`) | `1.4.4` (AA) | `9.1.4.4` | `critical` |
| 9 | Inline-style low contrast (`< 4.5:1` normal / `< 3.0:1` large text) & positive `tabindex` (`tabindex > 0`) | `1.4.3` (AA) / `2.4.3` (A) | `9.1.4.3` / `9.2.4.3` | `serious` |

***

### Sample Input JSON

#### Full-Site Bulk Audit via `sitemap.xml` (Recommended for Multi-Page Sites)

```json
{
  "sitemapUrl": "https://example.com/sitemap.xml",
  "maxUrls": 100,
  "includeUrlPatterns": [
    "/products/",
    "/docs/"
  ],
  "excludeUrlPatterns": [
    "/tag/",
    "/feed/"
  ]
}
```

#### Single URL

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

#### Batch URLs (up to 500) with Custom User-Agent

```json
{
  "urls": [
    "https://www.w3.org/WAI/demos/bad/before/home.html",
    "https://www.w3.org/WAI/demos/bad/after/home.html"
  ],
  "userAgent": "Mozilla/5.0 (compatible; EAA-WCAG-Accessibility-Auditor/0.1)"
}
```

***

### Input Parameters

| Field | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `url` | `string` | Optional\* | — | Single HTTP/HTTPS URL to audit. |
| `urls` | `array` (`stringList`) | Optional\* | `["https://example.com"]` (prefill) | Batch list of up to **500** HTTP/HTTPS URLs to audit in a single run. |
| `sitemapUrl` | `string` | Optional\* | — | XML sitemap URL (e.g., `https://example.com/sitemap.xml`). Supports standard `<urlset>`, nested `<sitemapindex>` (max depth 2, up to 20 child sitemaps), and `.xml.gz` compressed sitemaps. |
| `maxUrls` | `integer` | Optional | `50` | Maximum unique URLs to audit per run (`1–500`) after combining `url`, `urls`, and `sitemapUrl`, deduplicating, and applying URL filters. |
| `includeUrlPatterns` | `array` (`stringList`) | Optional | — | Substring allowlist: when provided, only URLs containing at least one pattern are audited. |
| `excludeUrlPatterns` | `array` (`stringList`) | Optional | — | Substring blocklist: URLs containing any pattern (e.g., `/tag/`, `/feed/`) are excluded. |
| `userAgent` | `string` | Optional | Default lightweight UA | Custom HTTP `User-Agent` header used for both page and sitemap fetches. |

\* Provide at least one of `url`, `urls`, or `sitemapUrl` (or combine them). All discovered URLs are deduplicated, filtered, and capped to `maxUrls`.

***

### Sample Output JSON

Each URL produces one structured JSON object in the default dataset:

```json
{
  "status": "ok",
  "url": "https://www.w3.org/WAI/demos/bad/after/home.html",
  "finalUrl": "https://www.w3.org/WAI/demos/bad/after/home.html",
  "score": 92,
  "complianceRiskLevel": "Low",
  "summary": {
    "totalIssues": 3,
    "reportedIssues": 3,
    "issuesTruncated": false,
    "severityCounts": {
      "critical": 0,
      "serious": 0,
      "moderate": 1,
      "minor": 2
    },
    "checksPassed": 7,
    "checksFailed": 2,
    "totalChecks": 9,
    "overview": "Static HTML screening scored 92/100 (Low EAA/WCAG compliance risk) with 3 issue(s) detected (1 moderate, 2 minor) across 2 of 9 checked rule categories. Primary areas needing remediation: Landmarks & Navigation (2), Headings (1)."
  },
  "issues": [
    {
      "ruleId": "heading-h1-multiple",
      "category": "Headings",
      "wcagCriterion": "1.3.1",
      "wcagLevel": "A",
      "en301549Clause": "9.1.3.1",
      "severity": "minor",
      "message": "Page contains 2 <h1> elements; best practice is a single primary <h1> per document.",
      "snippet": "<h1>Welcome to CityLights</h1>",
      "remediation": "Reserve <h1> for the single primary page title and demote secondary section titles to <h2> or lower."
    },
    {
      "ruleId": "landmark-main-missing",
      "category": "Landmarks & Navigation",
      "wcagCriterion": "1.3.1",
      "wcagLevel": "A",
      "en301549Clause": "9.1.3.1",
      "severity": "moderate",
      "message": "Page is missing a <main> (or role=\"main\") landmark region.",
      "snippet": "<body>",
      "remediation": "Wrap the primary content of the page in a single <main> element so keyboard and screen reader users can jump directly to main content."
    }
  ],
  "pageMetrics": {
    "httpStatus": 200,
    "finalUrl": "https://www.w3.org/WAI/demos/bad/after/home.html",
    "contentType": "text/html; charset=utf-8",
    "htmlSizeBytes": 11613,
    "fetchDurationMs": 175,
    "lang": "en",
    "title": "Welcome to CityLights! [Accessible Home Page]",
    "counts": {
      "images": 9,
      "headings": 9,
      "formControls": 1,
      "links": 55,
      "buttons": 1
    },
    "landmarks": {
      "main": 0,
      "nav": 0,
      "header": 0,
      "footer": 0,
      "skipLink": true
    }
  },
  "disclaimer": "This report is generated by an automated static HTML accessibility screening engine checking selected European Accessibility Act (EAA), EN 301 549, and WCAG 2.2 Level A/AA rules. It does not execute client-side JavaScript, evaluate external CSS stylesheets, or test interactive assistive technology behavior. It is not a legal compliance certification and does not replace a full manual accessibility audit.",
  "auditedAt": "2026-11-25T05:35:42.630Z"
}
```

***

### Deterministic Scoring & Risk Methodology

All scores and risk classifications are computed deterministically in TypeScript:

- **Score (`0–100`)**: Starts at `100` and deducts points per violation with per-rule caps so repetitive markup does not distort overall triage:
  - `critical`: `-12` per issue (max `-36` per rule)
  - `serious`: `-7` per issue (max `-21` per rule)
  - `moderate`: `-4` per issue (max `-12` per rule)
  - `minor`: `-2` per issue (max `-6` per rule)
- **Compliance Risk Level**:
  - **Critical**: `score < 50` or `>= 3` critical issues
  - **High**: `score < 70` or `>= 1` critical issue
  - **Moderate**: `score < 90` or `>= 1` serious issue
  - **Low**: `score >= 90` with zero critical and zero serious issues

To keep JSON payloads compact for AI agents and MCP clients, `issues` includes up to 20 sample instances per rule (150 total), while `summary.totalIssues` and `summary.severityCounts` always report exact counts across the full document.

***

### Pricing (Pay-Per-Event) & Error Handling

- **Pay-Per-Event (`url-audited`)**: Charged **only** for URLs that are successfully fetched and audited (`status: "ok"`).
- **Zero Charge on Failures**: Invalid URLs, unreachable or malformed sitemaps, HTTP 4xx/5xx responses, non-HTML content (e.g., PDFs/JSON), oversized responses (`> 5 MB` HTML / `> 10 MB` sitemap), or timeouts emit a structured `status: "error"` record and are **never charged**.
- **Budget Protection**: Automatically stops all workers immediately if the user's Apify pay-per-event spending limit (`eventChargeLimitReached`) is reached.
- **Polite Crawling**: Limits concurrency to 3 workers and enforces per-host request spacing so bulk sitemap audits do not overload target servers.

***

### Scope & Disclaimer

This Actor performs fast **static HTML** accessibility screening using `fetch` and `cheerio`. It does **not** execute client-side JavaScript (SPAs rendered strictly on the client may show minimal static HTML), evaluate external CSS rules, or test dynamic keyboard/screen-reader flows. Output is intended for automated screening and remediation triage only — it is **not** a legal compliance certification under the European Accessibility Act (Directive (EU) 2019/882) or EN 301 549, and does not replace a full manual audit with assistive technologies.

# Actor input Schema

## `url` (type: `string`):

Single HTTP or HTTPS URL to audit (e.g., 'https://example.com'). Can be used alone or combined with 'urls' and 'sitemapUrl'.

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

List of up to 500 HTTP or HTTPS URLs to audit in a single run.

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

Optional XML sitemap URL (e.g., 'https://example.com/sitemap.xml') to automatically discover and audit pages across an entire site. Supports standard <urlset>, nested <sitemapindex> (up to depth 2 and 20 child sitemaps), and gzip-compressed .xml.gz sitemaps.

## `maxUrls` (type: `integer`):

Maximum number of unique URLs to audit in a single run after combining 'url', 'urls', and 'sitemapUrl', deduplicating, and applying URL filters (default: 50, min: 1, max: 500).

## `includeUrlPatterns` (type: `array`):

Optional list of substrings. When specified, only URLs containing at least one of these substrings are audited (e.g., '/docs/', '/products/').

## `excludeUrlPatterns` (type: `array`):

Optional list of substrings. URLs containing any of these substrings are excluded from auditing (e.g., '/tag/', '/feed/').

## `userAgent` (type: `string`):

Optional custom HTTP User-Agent header to send when fetching target pages and sitemaps. Uses a lightweight default User-Agent if omitted.

## Actor input object example

```json
{
  "url": "https://example.com",
  "urls": [
    "https://example.com",
    "https://www.w3.org/WAI/"
  ],
  "sitemapUrl": "https://example.com/sitemap.xml",
  "maxUrls": 50,
  "includeUrlPatterns": [
    "/docs/",
    "/products/"
  ],
  "excludeUrlPatterns": [
    "/tag/",
    "/feed/"
  ],
  "userAgent": "Mozilla/5.0 (compatible; EAA-WCAG-Auditor/0.1)"
}
```

# Actor output Schema

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

JSON array of per-URL accessibility audit results stored in the default dataset.

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

// Run the Actor and wait for it to finish
const run = await client.actor("strata-mcp/eaa-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 = { "urls": ["https://example.com"] }

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

```

## MCP server setup

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