# WCAG Regression Diff Auditor (`enfex/wcag-regression-diff-auditor`) Actor

Compare buyer-supplied axe JSON snapshots and report new, resolved, and persistent accessibility findings without crawling URLs or exposing raw HTML.

- **URL**: https://apify.com/enfex/wcag-regression-diff-auditor.md
- **Developed by:** [Marcel K](https://apify.com/enfex) (community)
- **Categories:** Developer tools, Automation
- **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/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## WCAG Regression Diff Auditor

Compare two **buyer-supplied axe-compatible JSON snapshots** and receive one deterministic report of new, resolved, and persistent violation occurrences.

This Actor does not crawl websites, execute a browser, modify a site, provide legal advice, or certify WCAG compliance.

### What this Actor does

- Accepts one baseline and one current snapshot.
- Diffs unique `rule ID + target fingerprint` occurrences.
- Groups new, resolved, and persistent findings by axe rule.
- Returns only allowlisted rule metadata and SHA-256 selector fingerprints.
- Removes raw HTML, failure summaries, screenshots, page URLs, and arbitrary source payloads.
- Enforces 200 rules and 5,000 node occurrences per snapshot before diffing.

### Input

Each snapshot must contain a `violations` array compatible with the relevant axe result fields:

```json
{
  "comparisonLabel": "release-1-to-release-2",
  "baseline": {
    "violations": [
      {
        "id": "button-name",
        "impact": "serious",
        "help": "Buttons must have discernible text",
        "helpUrl": "https://dequeuniversity.com/rules/axe/4.10/button-name",
        "tags": ["wcag2a", "wcag412"],
        "nodes": [{ "target": ["#save-button"] }]
      }
    ]
  },
  "current": { "violations": [] }
}
```

Do not include secrets. You are responsible for ensuring that submitted snapshots are authorized and appropriately minimized.

### Output boundary

The default dataset receives one report. It contains counts, rule IDs, impact/help metadata, tags, and one-way selector fingerprints. It never returns the original selectors, node HTML, page URLs, failure summaries, screenshots, or raw snapshots.

A target fingerprint helps establish whether the same rule-target occurrence persists. It is not a DOM locator and cannot be reversed by this Actor.

### Limits

- Exactly two buyer-supplied snapshots per run.
- Maximum 200 violations/rules and 5,000 node occurrences per snapshot.
- Maximum 2 MB serialized input.
- No network requests, browser execution, proxies, APIs, LLMs, or credentials.
- One output item and at most one draft PPE event per run.

### Pricing draft

The private draft models **$0.20 per delivered regression report**. It is not active pricing. The 20% platform share is a sensitivity assumption only; current Apify terms and measured cloud cost must be verified before any PPE activation.

### Interpretation

A regression report is evidence about differences between two supplied scanner outputs. It does not prove accessibility, legal compliance, conformance level, severity prioritization, or absence of issues.

# Actor input Schema

## `comparisonLabel` (type: `string`):

A non-sensitive label for this baseline-to-current comparison, up to 100 characters.

## `baseline` (type: `object`):

Buyer-supplied baseline JSON object containing a violations array. Raw HTML and page URLs are never returned.

## `current` (type: `object`):

Buyer-supplied current JSON object containing a violations array. Maximum 200 rules and 5,000 nodes.

## Actor input object example

```json
{
  "comparisonLabel": "baseline-to-current",
  "baseline": {
    "violations": [
      {
        "id": "button-name",
        "impact": "serious",
        "help": "Buttons must have discernible text",
        "helpUrl": "https://dequeuniversity.com/rules/axe/4.10/button-name",
        "tags": [
          "wcag2a",
          "wcag412"
        ],
        "nodes": [
          {
            "target": [
              "#save-button"
            ]
          }
        ]
      }
    ]
  },
  "current": {
    "violations": [
      {
        "id": "image-alt",
        "impact": "critical",
        "help": "Images must have alternative text",
        "helpUrl": "https://dequeuniversity.com/rules/axe/4.10/image-alt",
        "tags": [
          "wcag2a",
          "wcag111"
        ],
        "nodes": [
          {
            "target": [
              "img.hero"
            ]
          }
        ]
      }
    ]
  }
}
```

# Actor output Schema

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

Default dataset item produced by the Actor.

# 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 = {
    "baseline": {
        "violations": [
            {
                "id": "button-name",
                "impact": "serious",
                "help": "Buttons must have discernible text",
                "helpUrl": "https://dequeuniversity.com/rules/axe/4.10/button-name",
                "tags": [
                    "wcag2a",
                    "wcag412"
                ],
                "nodes": [
                    {
                        "target": [
                            "#save-button"
                        ]
                    }
                ]
            }
        ]
    },
    "current": {
        "violations": [
            {
                "id": "image-alt",
                "impact": "critical",
                "help": "Images must have alternative text",
                "helpUrl": "https://dequeuniversity.com/rules/axe/4.10/image-alt",
                "tags": [
                    "wcag2a",
                    "wcag111"
                ],
                "nodes": [
                    {
                        "target": [
                            "img.hero"
                        ]
                    }
                ]
            }
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("enfex/wcag-regression-diff-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 = {
    "baseline": { "violations": [{
                "id": "button-name",
                "impact": "serious",
                "help": "Buttons must have discernible text",
                "helpUrl": "https://dequeuniversity.com/rules/axe/4.10/button-name",
                "tags": [
                    "wcag2a",
                    "wcag412",
                ],
                "nodes": [{ "target": ["#save-button"] }],
            }] },
    "current": { "violations": [{
                "id": "image-alt",
                "impact": "critical",
                "help": "Images must have alternative text",
                "helpUrl": "https://dequeuniversity.com/rules/axe/4.10/image-alt",
                "tags": [
                    "wcag2a",
                    "wcag111",
                ],
                "nodes": [{ "target": ["img.hero"] }],
            }] },
}

# Run the Actor and wait for it to finish
run = client.actor("enfex/wcag-regression-diff-auditor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "baseline": {
    "violations": [
      {
        "id": "button-name",
        "impact": "serious",
        "help": "Buttons must have discernible text",
        "helpUrl": "https://dequeuniversity.com/rules/axe/4.10/button-name",
        "tags": [
          "wcag2a",
          "wcag412"
        ],
        "nodes": [
          {
            "target": [
              "#save-button"
            ]
          }
        ]
      }
    ]
  },
  "current": {
    "violations": [
      {
        "id": "image-alt",
        "impact": "critical",
        "help": "Images must have alternative text",
        "helpUrl": "https://dequeuniversity.com/rules/axe/4.10/image-alt",
        "tags": [
          "wcag2a",
          "wcag111"
        ],
        "nodes": [
          {
            "target": [
              "img.hero"
            ]
          }
        ]
      }
    ]
  }
}' |
apify call enfex/wcag-regression-diff-auditor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=enfex/wcag-regression-diff-auditor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/UqGeoG4XqSmuF5Vpp/builds/kE5W53j5ItYbegKsh/openapi.json
