barrierlab-agent-pluginv0.1.0

CASOON Open Source

An accessibility audit your agent cannot talk its way around.

A Claude Code plugin on the barrierlab rule set. The engine decides what failed; the agent explains it, proposes the fix as a diff and keeps everything that was not checked on the page.

cargo install --git https://github.com/casoon/barrierlab-cli
/plugin marketplace add casoon/barrierlab-agent-plugin
MITv0.1.0Claude CodeWCAG 2.2
/barrierlab:page examples/page.html
Engine summary
  5 failed
  8 need review
  23 not checked
  3 rules did not run
  169 rules in the run

1. Failed
  images/alt-missing  WCAG 1.1.1
  forms/label-missing  WCAG 1.3.1, 3.3.2, 4.1.2
  links/name-missing  WCAG 2.4.4, 4.1.2
  buttons/name-missing  WCAG 4.1.2
  contrast/text-insufficient  WCAG 1.4.3
rules in the run on the example page
169
failures, each with line and source
5
findings reported as not checked
23
rules that did not run, with the reason
3

What you get

How a run works

Two authors, clearly separated: the engine and a script produce the facts, the agent adds explanation and a plan.

Focus
One run of /barrierlab:page
One run of /barrierlab:pageThe engine audits the page and writes report.json. digest.py arranges it into a fixed frame, the agent writes explanations and a plan below it, and digest.py --check confirms that every finding and every rule that did not run is still named in report.md.Page → barrierlab --jsonbarrierlab --json → digest.py: report.jsondigest.py → AgentAgent → digest.py --checkdigest.py --check → report.md: all nameddigest.py --check → Agent: missing keysreport.jsonall namedmissing keysPage – URL or HTML filePageURL or HTML filebarrierlab --json – decides every outcomebarrierlab --jsondecides every outcomedigest.py – fixed four-section framedigest.pyfixed four-section frameAgent – explains, proposes diffsAgentexplains, proposes diffsdigest.py --check – anything lost?digest.py --checkanything lost?report.md – next to report.jsonreport.mdnext to report.json

Source: commands/page.md, scripts/digest.py

Show chart data
Data for One run of /barrierlab:page
StepKindLeads to
Pagestartbarrierlab --json
barrierlab --jsoninput or outputdigest.py (report.json)
digest.pystepAgent
Agentstepdigest.py --check
digest.py --checkdecisionreport.md (all named), Agent (missing keys)
report.mdend
Focus
One run of /barrierlab:page
One run of /barrierlab:pageThe engine audits the page and writes report.json. digest.py arranges it into a fixed frame, the agent writes explanations and a plan below it, and digest.py --check confirms that every finding and every rule that did not run is still named in report.md.Page → barrierlab --jsonbarrierlab --json → digest.py: report.jsondigest.py → AgentAgent → digest.py --checkdigest.py --check → report.md: all nameddigest.py --check → Agent: missing keysreport.jsonall namedmissing keysPage – URL or HTML filePageURL or HTML filebarrierlab --json – decides every outcomebarrierlab --jsondecides every outcomedigest.py – fixed four-section framedigest.pyfixed four-section frameAgent – explains, proposes diffsAgentexplains, proposes diffsdigest.py --check – anything lost?digest.py --checkanything lost?report.md – next to report.jsonreport.mdnext to report.json

Source: commands/page.md, scripts/digest.py

Show chart data
Data for One run of /barrierlab:page
StepKindLeads to
Pagestartbarrierlab --json
barrierlab --jsoninput or outputdigest.py (report.json)
digest.pystepAgent
Agentstepdigest.py --check
digest.py --checkdecisionreport.md (all named), Agent (missing keys)
report.mdend

Generated at build time

All examples →
# Accessibility report: examples/page.html

Engine summary: 5 failed · 8 need review · 23 not checked · 3 rules did not run · 169 rules in the run

## 1. Failed

### `images/alt-missing` · WCAG 1.1.1 · severity high

- `images/alt-missing@14:3` (line 14, column 3): The image has no alt attribute.
  - source: `<img src="team.jpg">`

### `forms/label-missing` · WCAG 1.3.1, 3.3.2, 4.1.2 · severity critical

- `forms/label-missing@17:5` (line 17, column 5): The input has no label.
  - source: `<input type="text" name="email">`

### `links/name-missing` · WCAG 2.4.4, 4.1.2 · severity critical

- `links/name-missing@15:3` (line 15, column 3): The link has no accessible name.
  - source: `<a href="/contact"></a>`

### `buttons/name-missing` · WCAG 4.1.2 · severity critical

- `buttons/name-missing@18:5` (line 18, column 5): The button has no accessible name.
  - source: `<button></button>`

### `contrast/text-insufficient` · WCAG 1.4.3 · severity high

- `contrast/text-insufficient@13:3` (line 13, column 3): The text reaches a contrast ratio of 2.59:1; 4.5:1 is required for normal text.
  - source: `<p class="note">We answer within two days.</p>`
  - evidence (computed): contrast_ratio = 2.59
  - evidence (computed): required_ratio = 4.5

The “Failed” section of the frame for the example page, as scripts/digest.py prints it. The test suite compares this file with the script’s output.

examples/page.report.md

Quickstart

From nothing to a first report. The walkthrough is in the documentation.

  1. Install the engine with cargo install and the plugin from its marketplace.
  2. Run /barrierlab:doctor to check the setup.
  3. Run /barrierlab:page on a file or URL and read report.md.

Frequently asked questions

Does the report say whether my page is WCAG conformant?

No. It names the criteria each finding belongs to and what was not checked. A static run cannot decide conformance, and the plugin does not pretend to.

Can the agent hide or downgrade a finding?

The command forbids it, and the check after writing fails when the key of a finding or the id of a rule that did not run is missing from the report.

Does it change my code?

No. Fixes are shown as diffs. The command writes only its two report files under .barrierlab/runs/.

Does it need a browser?

No. The engine analyses HTML and CSS statically. What only a browser can show is listed as not checked.

Audit your first page.

Install the plugin