# agent402.tools WCAG Accessibility Audit

> agent402.tools WCAG Accessibility Audit is a paid API for AI agents from agent402.tools, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-15).

Runs a deterministic WCAG 2.x accessibility audit on an HTML document, checking language attribute, document title, heading order, link text, and color contrast against a specified foreground/background color pair.

## Facts

- Endpoint: POST https://agent402.tools/api/skill/a11y-audit
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-wcag-accessibility-audit-2fdc4a4d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_QCbW89bCAtd9YueN6gVOS

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agent402-tools-wcag-accessibility-audit-2fdc4a4d -d '<json body>'
```

Example prompt: Run a WCAG accessibility audit on this HTML document — the background color is #ffffff and the text color is #333333 — and tell me every compliance issue it finds, including contrast, heading order, link text, language tag, and document title.

## When to prefer this

Use this endpoint when you need a deterministic, rule-based WCAG 2.x accessibility audit on raw HTML with a known color scheme — especially when you want structured violation data without running a full browser-based tool like Lighthouse. Ideal for CI pipelines, pre-publish checks, or agent workflows that generate or transform HTML and need to verify accessibility compliance programmatically.

## Known failure modes

- Malformed or empty HTML string returns an error or empty results
- Invalid hex color format for foreground or background causes a parsing error
- Missing required fields (html, foreground, background) returns a 400-level error
- Very large HTML documents may time out or exceed processing limits
- Payment not received (x402 flow failure) results in a 402 response blocking execution

## How this service works

Bundled execution of the WCAG accessibility audit workflow - Run a deterministic WCAG 2.x audit of an HTML page from a string and a fg/bg color pair. Checks language attribute (3.1.1), document title (2.4.2), heading order (1.3.1), link-text prese...

## Output

Returns a structured list of WCAG 2.x violations found in the HTML, including which success criteria failed (e.g. 1.3.1 heading order, 2.4.2 document title, 3.1.1 language attribute, link text presence) and color contrast ratio results for the provided foreground/background pair.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "html": {
   "type": "string",
   "description": "the HTML document to audit (full document or fragment, as a string)"
  },
  "background": {
   "type": "string",
   "description": "the canonical body background color as a hex string (e.g. '#ffffff')"
  },
  "foreground": {
   "type": "string",
   "description": "the canonical body text color as a hex string (e.g. '#333333')"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "args": {
   "html": "<!doctype html><html lang=\"en\"><head><title>Quarterly Earnings Brief</title><meta name=\"viewport\" content=\"width=device-width\"></head><body><h1>Q4 Earnings Summary</h1><h3>Revenue</h3><p>Total revenue was $4.2M, up 18% year-over-year. The increase was driven primarily by enterprise SaaS contracts and a one-time licensing arrangement.</p><h2>Costs</h2><p>Operating costs grew 12% to $2.9M. Headcount expansion in engineering accounted for the majority of the increase.</p><p>Read the <a href=\"/full-report\">full report</a> or <a href=\"https://investor.example.com\">visit investor relations</a>. Click <a href=\"/contact\">here</a> for questions.</p></body></html>",
   "background": "#ffffff",
   "foreground": "#333333"
  },
  "pack": "a11y-audit",
  "steps": [
   {
    "ok": true,
    "slug": "html-meta",
    "result": {}
   },
   {
    "ok": true,
    "slug": "html-strip",
    "result": {}
   },
   {
    "ok": true,
    "slug": "html-links",
    "result": {}
   },
   {
    "ok": true,
    "slug": "html-select",
    "result": {}
   },
   {
    "ok": true,
    "slug": "color-contrast",
    "result": {}
   },
   {
    "ok": true,
    "slug": "readability",
    "result": {}
   },
   {
    "ok": true,
    "slug": "text-stats",
    "result": {}
   }
  ],
  "summary": "7/7 steps succeeded"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-wcag-accessibility-audit-2fdc4a4d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
