# AccessFix WCAG 2.2 Accessibility Checker with Code Fixes (`syncforgecloud/accessfix-eaa-wcag-auditor-mcp`) Actor

Crawls public pages and checks static HTML/CSS against 25 WCAG 2.2 A/AA and best-practice rules (contrast, alt text, labels, ARIA, focus, target size). Returns copy-paste fixes and flags overlays. Automated aid, not legal certification.

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

## Pricing

from $490.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

## AccessFix WCAG 2.2 Accessibility Checker with Code Fixes

AccessFix (`accessfix-eaa-wcag-auditor-mcp`) is an Apify Pay-Per-Event Actor and stdio MCP server by **SyncForge Cloud Studio**. It crawls public HTTP/HTTPS pages (or reads raw HTML) and checks static HTML and CSS against 25 automated accessibility rules plus an overlay-script advisory, returning copy-paste HTML/CSS fix suggestions and a Markdown report.

> **Scope and legal notice:** AccessFix is an automated engineering aid, not legal advice, not a legal opinion, and not a WCAG or European Accessibility Act (EAA / Directive (EU) 2019/882) conformance certificate. Passing every automated rule does not mean a site conforms to WCAG 2.2 or EN 301 549. Manual testing with keyboard navigation and screen readers is still required.

### What it does

- Crawls one or more public `http://` or `https://` URLs and optionally follows same-origin links (up to 250 pages per run).
- Parses static HTML and `<style>` blocks in linear time (Python stdlib `html.parser`, 5 MB per-page cap, 25,000-element cap).
- Runs 22 WCAG 2.2 Level A/AA static rules, 3 structural best-practice rules, and 1 third-party overlay-widget advisory.
- Computes W3C WCAG 2.x relative luminance contrast ratios across inline styles, `<style>` rules, and `:root` CSS custom properties, and solves for a nearby `#RRGGBB` foreground color that meets the target ratio (4.5:1 normal text, 3.0:1 large text or UI borders, 7.0:1 AAA in the MCP color tool).
- Emits suggested HTML/CSS fixes for each finding, a per-page Markdown report (`markdownDossier`), and a combined `ACCESSIBILITY_REPORT.md` plus `PPE_BILLING_SUMMARY` in the default key-value store.
- Blocks SSRF targets (loopback, RFC1918/IPv6 private ranges, cloud metadata `169.254.169.254`, `.local`/`.internal`/`.arpa`, shorthand/octal/hex IPs, Punycode/IDN homographs, DNS rebinding, and hop-by-hop redirects to private hosts).

### What it checks

Every rule implemented in `src/wcag_engine.py`:

| Rule ID | Standard / Category | Confidence |
| :--- | :--- | :--- |
| `EAA-HTML-LANG-MISSING` | WCAG 3.1.1 (A) | likely-failure |
| `EAA-HTML-LANG-INVALID` | WCAG 3.1.1 (A) | likely-failure |
| `EAA-DOC-TITLE-MISSING` | WCAG 2.4.2 (A) | likely-failure |
| `EAA-HEADING-MISSING-H1` | Best practice (supports 1.3.1) | best-practice |
| `EAA-HEADING-LEVEL-SKIP` | Best practice (supports 1.3.1) | best-practice |
| `EAA-LANDMARK-MAIN-MISSING` | Best practice (supports 1.3.1 / 2.4.1) | best-practice |
| `EAA-SKIP-LINK-MISSING` | WCAG 2.4.1 (A) | needs-review |
| `EAA-VIEWPORT-ZOOM-LOCK` | WCAG 1.4.4 (AA) | likely-failure |
| `EAA-FOCUS-OUTLINE-SUPPRESSED` | WCAG 2.4.7 (AA) | needs-review |
| `EAA-ARIA-BROKEN-REF` | WCAG 1.3.1 / 4.1.2 (A) | likely-failure |
| `EAA-ARIA-INVALID-ROLE` | WCAG 4.1.2 (A) | likely-failure |
| `EAA-ARIA-HIDDEN-FOCUSABLE` | WCAG 4.1.2 (A) | likely-failure |
| `EAA-IMG-ALT-MISSING` | WCAG 1.1.1 (A) | likely-failure |
| `EAA-IMG-ALT-FILENAME` | WCAG 1.1.1 (A) | needs-review |
| `EAA-SVG-ICON-UNLABELLED` | WCAG 1.1.1 / 4.1.2 (A) | likely-failure |
| `EAA-FORM-CONTROL-UNLABELLED` | WCAG 1.3.1 / 3.3.2 (A) | likely-failure |
| `EAA-BUTTON-EMPTY-NAME` | WCAG 4.1.2 (A) | likely-failure |
| `EAA-LINK-EMPTY-NAME` | WCAG 2.4.4 / 4.1.2 (A) | likely-failure |
| `EAA-LINK-AMBIGUOUS-TEXT` | WCAG 2.4.4 (A) | needs-review |
| `EAA-MEDIA-AUTOPLAY` | WCAG 1.4.2 / 2.2.2 (A) | needs-review |
| `EAA-DEPRECATED-MOTION` | WCAG 2.2.2 (A) | likely-failure |
| `EAA-TABLE-HEADERS-MISSING` | WCAG 1.3.1 (A) | needs-review / best-practice |
| `EAA-TARGET-SIZE-MINIMUM` | WCAG 2.5.8 (AA, new in 2.2) | needs-review |
| `EAA-COLOR-CONTRAST-UI` | WCAG 1.4.11 (AA) | needs-review |
| `EAA-COLOR-CONTRAST-TEXT` | WCAG 1.4.3 (AA) | likely-failure |
| `OVERLAY-WIDGET-DETECTED` | Advisory (not a WCAG criterion) | advisory |

Note on EN 301 549: EN 301 549 v3.2.1 Clause 9 (web) references WCAG 2.1 Level A/AA. WCAG 2.2 criterion `2.5.8` (Target Size Minimum) is included as a forward-looking check.

### Limitations (what this tool does NOT check)

- **Static HTML and inline `<style>` only:** AccessFix does not run a headless browser, does not execute JavaScript, and does not fetch external `<link rel="stylesheet">` CSS files. Single-page apps that render content client-side will only have their initial HTML shell checked unless you pass rendered HTML in `rawHtml`.
- **No layout engine:** CSS specificity, computed box dimensions, z-index/sticky header overlap, text reflow, and visual focus obscuration are not evaluated. Target size (`EAA-TARGET-SIZE-MINIMUM`) only checks explicit CSS `width`/`height`/`min-width`/`min-height` declarations.
- **No axe-core or browser runtime:** Rules are deterministic static checks implemented directly in Python (`src/wcag_engine.py`).
- **Human judgement required:** Meaningful alt text, keyboard tab order, modal focus traps, captions/transcripts, form error recovery, cognitive clarity, and screen reader announcements cannot be verified by static inspection.
- **Heuristic score:** `accessibilityScore` (0-100) and `grade` summarize automated findings only. They are not a conformance percentage.

### Input

The Actor input schema (`.actor/input_schema.json`) prefills `https://example.com` with `maxPages: 1` so you can test a run with zero configuration.

| Field | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `startUrls` | array | prefill `https://example.com` | Public `http://` or `https://` URLs to check. Private/local/metadata hosts are blocked. |
| `rawHtml` | string | empty | Raw HTML to check offline without fetching any URL. Max 5 MB. Billed as one page. |
| `maxPages` | integer | `10` (prefill `1`) | Maximum pages to check in one run (1 to 250). |
| `crawlSameOriginLinks` | boolean | `true` | Follow links sharing the exact origin (scheme + host + port) up to `maxPages`. |
| `wcagTargetLevel` | string | `"AA"` | `"AA"` runs all rules; `"A"` skips AA-only rules (contrast, focus outline, target size, zoom lock). |
| `includeFixPatches` | boolean | `true` | Include suggested HTML/CSS fixes (`fix-patch-generated` event per fix). Set `false` to pay only per page. |
| `includeMarkdownDossier` | boolean | `true` | Include `markdownDossier` per dataset item and save combined `ACCESSIBILITY_REPORT.md` to the key-value store. No extra charge. |
| `timeoutSecs` | integer | `15` | Per-request network timeout in seconds (3 to 60). Timed-out pages are skipped and not billed. |

Example input:

```json
{
  "startUrls": [{ "url": "https://example.com" }],
  "maxPages": 1,
  "crawlSameOriginLinks": false,
  "wcagTargetLevel": "AA",
  "includeFixPatches": true,
  "includeMarkdownDossier": true,
  "timeoutSecs": 15
}
```

### Output example

Each audited URL (or `rawHtml` input) produces one dataset item. Unreachable, blocked, non-HTML, or timed-out URLs are pushed with `"status": "failed"` at no charge so you can see why they were skipped.

```json
{
  "url": "https://example.com/",
  "status": "audited",
  "httpStatus": 200,
  "wcagTargetLevel": "AA",
  "accessibilityScore": 92,
  "grade": "A",
  "automatedChecksPassed": true,
  "totalViolations": 2,
  "criticalCount": 0,
  "seriousCount": 0,
  "moderateCount": 2,
  "likelyFailureCount": 0,
  "needsReviewCount": 0,
  "bestPracticeCount": 2,
  "overlayLegalRiskDetected": false,
  "overlayVendors": [],
  "fixPatchesGenerated": 2,
  "truncated": false,
  "violations": [
    {
      "ruleId": "EAA-LANDMARK-MAIN-MISSING",
      "wcagCriterion": "Best practice (supports WCAG 1.3.1 / 2.4.1)",
      "eaaClause": "Not required by EN 301 549",
      "severity": "moderate",
      "confidence": "best-practice",
      "selector": "body",
      "line": 1,
      "offendingSnippet": "<body><div class=\"content\">...</div></body>",
      "fixedSnippet": "<body>\n  <main id=\"main-content\">\n    <!-- primary page content -->\n  </main>\n</body>",
      "explanation": "Pages must expose a <main> landmark so screen reader users can bypass repeated header chrome."
    }
  ],
  "disclaimer": "Automated aid only. These results cover a subset of WCAG 2.2 Level A/AA that can be checked from static HTML and CSS. They are not a legal opinion, a conformance certificate, or proof of European Accessibility Act compliance. Manual testing with keyboard and assistive technology is still required."
}
```

### Pricing (Apify Pay-Per-Event)

Configured in `.actor/pay_per_event.json` and metered in `src/main.py`:

| Event | Price (USD) | When it is charged |
| :--- | :--- | :--- |
| `actor-start` | `$0.09` | Charged once per run after input validation. Not charged if input is empty or invalid. |
| `page-audited` | `$0.49` | Charged per page actually fetched and audited (or per `rawHtml` input). Failed, blocked, timed-out, or non-HTML URLs are free. |
| `fix-patch-generated` | `$0.09` | Charged per suggested HTML/CSS fix included in results. Set `includeFixPatches: false` to skip this charge. Overlay advisories are never billed. |

If your run spending limit is reached mid-run, the crawl stops immediately and any unpaid fix snippets are stripped before pushing the item.

Example cost for 100 audited pages with 100 fix suggestions: `$0.09 + (100 x $0.49) + (100 x $0.09) = $58.09`.

### Local CLI usage

```bash
pip install -r requirements.txt

## Audit a public URL (single page)
python -m src.main --urls https://example.com --max-pages 1 --no-crawl

## Audit a local HTML file offline and save a Markdown report
python -m src.main --html-file docs/index.html --dossier-out report.md
```

### MCP server setup (Claude Desktop, Claude Code, Cursor)

AccessFix includes a stdio JSON-RPC 2.0 MCP server supporting both `Content-Length` LSP framing and newline-delimited JSON, with three tools:

- `audit_url_accessibility`: SSRF-hardened static HTML/CSS audit for public URLs
- `audit_html_snippet`: Offline audit for HTML snippets or full documents
- `suggest_accessible_color`: W3C luminance contrast calculator and brand-preserving `#RRGGBB` solver

Add to `claude_desktop_config.json` or `.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "accessfix-eaa-wcag": {
      "command": "python",
      "args": ["-m", "src.mcp_server"],
      "cwd": "/absolute/path/to/07_apify_eaa_wcag_auditor_mcp"
    }
  }
}
```

### Support and legal links

- Documentation: `https://syncforgecloud.com/accessfix`
- Privacy Policy: `https://syncforgecloud.com/accessfix-privacy`
- Terms & EULA: `https://syncforgecloud.com/accessfix-eula`
- Security & Trust Center: `https://syncforgecloud.com/accessfix-security`
- Support: `support@syncforgecloud.com` | Security: `security@syncforgecloud.com`

### Running tests

```bash
pytest -q
```

# Actor input Schema

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

Public http:// or https:// pages to check. Private, local and cloud-metadata addresses are blocked.

## `rawHtml` (type: `string`):

Paste HTML to check without fetching anything. Billed as one page. Max 5 MB.

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

Most pages to check in this run, including pages found by following links. Each checked page is billed.

## `crawlSameOriginLinks` (type: `boolean`):

Also check links that share the exact origin (scheme + host + port) of a start URL, up to Maximum pages.

## `wcagTargetLevel` (type: `string`):

AA runs every rule. A skips the AA-only rules (contrast, focus visible, target size, zoom).

## `includeFixPatches` (type: `boolean`):

Add a suggested HTML/CSS fix to each finding. Each fix is billed as a fix-patch-generated event. Turn off to pay only per page.

## `includeMarkdownDossier` (type: `boolean`):

Add a readable Markdown report per page and save a combined ACCESSIBILITY_REPORT.md to the key-value store. No extra charge.

## `timeoutSecs` (type: `integer`):

Network timeout per request. A page that has not fully loaded after roughly twice this value is skipped and not billed.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://example.com"
    }
  ],
  "maxPages": 1,
  "crawlSameOriginLinks": true,
  "wcagTargetLevel": "AA",
  "includeFixPatches": true,
  "includeMarkdownDossier": true,
  "timeoutSecs": 15
}
```

# Actor output Schema

## `auditResults` (type: `string`):

No description

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

// Run the Actor and wait for it to finish
const run = await client.actor("syncforgecloud/accessfix-eaa-wcag-auditor-mcp").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" }],
    "maxPages": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("syncforgecloud/accessfix-eaa-wcag-auditor-mcp").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"
    }
  ],
  "maxPages": 1
}' |
apify call syncforgecloud/accessfix-eaa-wcag-auditor-mcp --silent --output-dataset

```

## MCP server setup

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

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/gZ9peTWQRLNqiVLqP/builds/zEtItj1WrSLUfOQMo/openapi.json
