# WCAG 2.2 Accessibility Scanner (axe-core) (`thaliabloom/wcag-accessibility-scanner`) Actor

Scan any public web page for WCAG 2.2 AA accessibility failures with axe-core. Returns each failing rule, its impact, the WCAG criteria, how many elements fail, and sample selectors to fix. Optional store mode also scans one category and one product page.

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

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## 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 2.2 Accessibility Scanner (axe-core)

Scan any public web page for WCAG 2.2 AA failures. You get one row per page:
each failing rule, its impact, the WCAG success criteria, how many elements
fail, and sample CSS selectors with HTML so a developer or coding agent can fix
them.

Built for AI agents. Plain JSON in, plain JSON out, one charge per page.

### What it does

- Loads each URL in real Chrome and runs axe-core with the WCAG 2.0, 2.1 and
  2.2 A/AA rule sets.
- Counts failing elements by impact: critical, serious, moderate, minor.
- Keeps elements inside third-party iframes (chat widgets, review embeds) out
  of the main count and reports them apart, because the site owner can't
  edit that code.
- **Store mode** (optional): from each URL, also finds and scans one
  collection page and one product page. Works on Shopify and WooCommerce.

### Input

```json
{
  "urls": ["https://example.com"],
  "storeMode": false,
  "samplesPerRule": 3
}
```

### Output (one dataset row per page)

```json
{
  "url": "https://example.com/",
  "pageType": "page",
  "title": "Example Domain",
  "standard": "WCAG 2.2 AA",
  "failedRules": 2,
  "failedElements": 5,
  "critical": 0, "serious": 4, "moderate": 1, "minor": 0,
  "elementsInThirdPartyFrames": 0,
  "passedRules": 21,
  "needsReview": 1,
  "violations": [
    {
      "rule": "color-contrast",
      "impact": "serious",
      "help": "Elements must meet minimum color contrast ratio thresholds",
      "helpUrl": "https://dequeuniversity.com/rules/axe/4.11/color-contrast",
      "wcag": ["wcag143"],
      "elements": 4,
      "samples": [{ "selector": ".footer a", "html": "<a href=\"/about\">About</a>" }]
    }
  ],
  "getFixes": "https://thaliabloom.com/accessibility"
}
```

A page that fails to load returns a row with `error` and is not charged.

### Pricing

Pay per event: you pay only for pages that were scanned. Set a max charge on
the run and the scan stops cleanly when it's reached.

### Use it from an AI agent

Agents connected to the Apify MCP server (`https://mcp.apify.com`) can find
this Actor by searching "accessibility" or "WCAG" and call it directly. Pass
`urls`, then read the dataset rows.

### Honest limits

- Automated tools catch only part of WCAG. A clean scan does not mean a page is
  accessible or that a site is legally compliant. Nobody can promise "ADA
  compliant" from a scan.
- Pages behind a login, a CAPTCHA or bot blocking can't be scanned.
- Only public URLs. Don't send private or internal pages.

### Want the fixes done?

Thalia Bloom does code-level accessibility fixes for online stores:
https://thaliabloom.com/accessibility

# Actor input Schema

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

Public page URLs. Each URL is one scan (one charge).

## `storeMode` (type: `boolean`):

For online stores (Shopify, WooCommerce): also find and scan one collection page and one product page from each URL. Up to 3 scans per URL.

## `samplesPerRule` (type: `integer`):

How many failing elements to include per rule, with CSS selector and HTML snippet.

## Actor input object example

```json
{
  "urls": [
    "https://www.w3.org/WAI/demos/bad/before/home.html"
  ],
  "storeMode": false,
  "samplesPerRule": 3
}
```

# Actor output Schema

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

Accessibility findings, one row per page scanned.

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

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

```

## MCP server setup

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