# a11y-preflight

> a11y-preflight is a paid API for AI agents from payai.agentstools.dev, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-15).

Statically checks a UI markup fragment (JSX, TSX, Vue, Angular, or HTML) against WCAG 2.2 accessibility rules and returns a pass/caution/block verdict with per-finding details.

## Facts

- Endpoint: POST https://payai.agentstools.dev/a11y/preflight
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/a11y-preflight-d04afa2d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_AOREnPGyS7HtNEzcwTkph

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 a11y-preflight-d04afa2d -d '<json body>'
```

Example prompt: Can you run a WCAG AA accessibility check on this JSX component and tell me if there are any missing alt texts, unlabeled form fields, or ARIA issues — give me the verdict and the specific line numbers for each problem?

## When to prefer this

Choose this endpoint when you need a fast, pre-merge or pre-deploy static accessibility gate for UI markup fragments in JSX, TSX, Vue, Angular, or HTML. It is ideal for CI pipelines, code review automation, or agent-driven UI generation workflows where you want instant WCAG 2.2 feedback without spinning up a browser or running axe-core in a live DOM. Prefer it over full runtime audit tools when you only have source markup available and need a structured machine-readable verdict with per-finding WCAG criterion references.

## Known failure modes

- Malformed or unparseable markup may cause an error or empty findings list
- Framework auto-detection may misidentify the source type for ambiguous snippets
- Static contrast check only works if a palette map is provided; dynamic CSS variables not resolved at runtime cannot be evaluated
- Only static patterns detectable without a DOM or browser are reported; runtime-injected content is not covered
- Missing required 'markup' field returns a 400-level error

## How this service works

Static accessibility (WCAG 2.2) check of a UI markup fragment for JSX, TSX, Vue, Angular or HTML. Detects missing image alt, unlabeled form controls, buttons and links with no accessible name, skipped heading levels, invalid ARIA, non-interactive click handlers, duplicate ids, positive tabindex and low static colour contrast. Returns a pass, caution or block verdict with per-finding WCAG criterion, element and line. Accessibility indicators, not a legal compliance guarantee.

## Output

Returns a top-level verdict of 'pass', 'caution', or 'block', along with a list of per-finding details. Each finding includes the specific WCAG 2.2 criterion violated, the element affected, the line number in the submitted markup, and a description of the issue. No runtime or dynamic behavior is evaluated — results are static analysis indicators only.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "level": {
   "enum": [
    "A",
    "AA"
   ],
   "type": "string",
   "description": "WCAG conformance level to check (default AA)"
  },
  "theme": {
   "type": "object",
   "description": "Alias of palette"
  },
  "markup": {
   "type": "string",
   "description": "The UI markup fragment or component to check"
  },
  "palette": {
   "type": "object",
   "description": "Optional name-to-colour map for static contrast (e.g. CSS variables / theme tokens)"
  },
  "framework": {
   "enum": [
    "auto",
    "html",
    "jsx",
    "tsx",
    "vue",
    "angular"
   ],
   "type": "string",
   "description": "Source framework (default auto-detect)"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/a11y-preflight-d04afa2d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from payai.agentstools.dev](https://www.zero.xyz/host/payai.agentstools.dev/llms.txt)
