Go accessibility auditing toolkit for WCAG 2.0, 2.1, and 2.2 compliance testing.
- ✅ WCAG Compliance Testing - Supports WCAG 2.0, 2.1, and 2.2 at levels A, AA, and AAA
- 🔍 Multiple Audit Modes - Single page, site crawling, and user journey testing
- 🪓 axe-core Integration - Industry-standard accessibility testing via axe-core
- 🤖 LLM-as-a-Judge - Optional AI evaluation to reduce false positives
- 📊 Report Formats - JSON, HTML, Markdown, VPAT 2.4, WCAG-EM, CSV
- 🔌 MCP Server - Model Context Protocol integration for AI assistants
- 🌐 HTTP API - REST API for programmatic access
- 🤝 Multi-Agent Spec - Integration with multi-agent workflows
go install github.com/plexusone/agent-a11y/cmd/agent-a11y@latest- Go 1.25+
- Chrome/Chromium browser (for browser-based testing)
# Audit a single page
agent-a11y audit https://example.com
# Audit with site crawling
agent-a11y audit https://example.com --crawl --depth 2
# Specify WCAG level and version
agent-a11y audit https://example.com --level AA --version 2.2
# Output to file with format
agent-a11y audit https://example.com -o report.html --format html
# Enable LLM evaluation (reduces false positives)
agent-a11y audit https://example.com --llm-provider anthropic --llm-model claude-sonnet-4-20250514package main
import (
"context"
"fmt"
"log"
a11y "github.com/plexusone/agent-a11y"
)
func main() {
// Create auditor
auditor, err := a11y.New(
a11y.WithLevel(a11y.LevelAA),
a11y.WithVersion(a11y.Version22),
)
if err != nil {
log.Fatal(err)
}
defer auditor.Close()
// Audit a page
result, err := auditor.AuditPage(context.Background(), "https://example.com")
if err != nil {
log.Fatal(err)
}
fmt.Println(result.Summary())
// WCAG 2.2 Level AA: Conformant (Score: 95/100, Issues: 0 critical, 0 serious, 1 moderate, 2 minor)
}| Command | Description |
|---|---|
audit <url> |
Run accessibility audit on a URL |
serve |
Start HTTP API server |
mcp serve |
Start MCP server for AI assistants |
compare <before> <after> |
Compare accessibility between two URLs |
demo list |
List available demo sites |
demo run [name] |
Run demo audit on sample sites |
version |
Show version information |
| Format | Flag | Description |
|---|---|---|
| JSON | --format json |
Machine-readable JSON output |
| HTML | --format html |
Interactive HTML report |
| Markdown | --format markdown |
Markdown report |
| VPAT | --format vpat |
VPAT 2.4 accessibility conformance report |
| WCAG-EM | --format wcag |
WCAG-EM evaluation report |
| CSV | --format csv |
CSV export of findings |
Create a config file at ~/.agent-a11y.yaml or specify with --config:
wcag:
level: AA
version: "2.2"
browser:
headless: true
timeout: 30s
llm:
enabled: true
provider: anthropic
model: claude-sonnet-4-20250514
crawl:
depth: 2
maxPages: 50
delay: 500msagent-a11y supports multiple LLM providers for AI-assisted evaluation:
| Provider | Environment Variable |
|---|---|
| Anthropic | ANTHROPIC_API_KEY |
| OpenAI | OPENAI_API_KEY |
GOOGLE_API_KEY |
|
| xAI | XAI_API_KEY |
| Ollama | (local, no key required) |
Run as an MCP server for integration with AI assistants:
agent-a11y mcp serveAdd to your Claude Desktop config:
{
"mcpServers": {
"a11y": {
"command": "agent-a11y",
"args": ["mcp", "serve"]
}
}
}Start the API server:
agent-a11y serve --port 8080Endpoints:
POST /audit- Run an accessibility auditGET /health- Health check
agent-a11y integrates with the multi-agent-spec for use in multi-agent workflows:
result, _ := auditor.AuditPage(ctx, url)
// Convert to AgentResult for multi-agent workflows
agentResult := result.AgentResult()
// Get narrative for reports
narrative := result.Narrative()See the examples directory:
- basic - Simple single-page audit
- multi-agent - Multi-agent workflow integration
# Run tests
go test -v ./...
# Run linter
golangci-lint run
# Build CLI
go build -o agent-a11y ./cmd/agent-a11yMIT