Automated Accessibility Audit API: Real-Time Compliance Checks for Every Deployment
Every website you ship is potentially non-compliant. WCAG 2.1 violations lurk in HTML you didn't write, dependencies you didn't audit, and UI changes you shipped last week. And when litigation happens, "we didn't know" isn't a defense.
PageBolt's /audit endpoint runs accessibility checks automatically — on every deploy, every staging push, every competitor monitor. No local setup. No browser management. Just REST.
The Accessibility Problem
Accessibility isn't a feature. It's a compliance requirement — and increasingly a legal liability.
According to WebAIM's 2024 analysis of 1 million+ homepage samples, 96.3% contain at least one detectable accessibility error. Worse: accessibility lawsuits rose 96% from 2019 to 2023 (Seyfarth Shaw LLP, AODA 2024 Report), with private sector plaintiffs now filing more cases than government enforcement bodies.
- WCAG 2.1 Level AA — legally mandated in EU (EN 301 549), required for US federal sites (Section 508), increasingly enforced in private sector lawsuits ($5K–15K settlements average per case, Accessibility Partners data)
- Manual audits are too slow — hiring professional auditors takes 4–6 weeks and costs $5K–15K per engagement (Accessibility Associates survey 2024); your engineering velocity is days
- Automated testing tools are vendor lock-in — Deque axe DevTools, Accessibility Insights, WAVE all lock you into their tooling
- Browser-based testing doesn't scale — you need to audit 50 pages, 5 competitors, 100 user workflows per day
The API Solution
PageBolt's /audit endpoint returns structured accessibility violations with remediation steps:
curl -X POST https://api.pagebolt.dev/v1/audit \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://yoursite.com/checkout",
"options": {
"standards": ["wcag2aa", "wcag21aa"],
"include_violations": true
}
}'
Response:
{
"url": "https://yoursite.com/checkout",
"standards": ["wcag2aa", "wcag21aa"],
"violations": {
"critical": [
{
"id": "color-contrast",
"description": "Elements must have sufficient color contrast (Level AA)",
"elements": 3,
"wcag_ref": "WCAG 2.1 1.4.3 Contrast (Minimum)",
"impact": "critical",
"remediation": "Increase contrast ratio to at least 4.5:1 for normal text"
}
],
"serious": [
{
"id": "duplicate-id",
"description": "IDs must be unique",
"elements": 2,
"wcag_ref": "WCAG 2.1 4.1.1 Parsing",
"impact": "serious"
}
],
"moderate": [
{
"id": "list-structure",
"description": "Lists should be semantically marked with `<ul>`, `<ol>`, or `<dl>`",
"elements": 5,
"wcag_ref": "WCAG 2.1 1.3.1 Info and Relationships"
}
]
},
"audit_time_ms": 2847,
"total_violations": 10
}
Real-World Use Cases
1. CI/CD Deploy Gate (Node.js)
Fail the deploy if critical violations appear:
// github-actions-deploy.js
const res = await fetch('https://api.pagebolt.dev/v1/audit', {
method: 'POST',
headers: { 'Authorization': `Bearer ${process.env.PAGEBOLT_KEY}` },
body: JSON.stringify({
url: `https://staging-${process.env.GITHUB_REF_NAME}.yourapp.com`,
options: { standards: ['wcag21aa'] }
})
});
const audit = await res.json();
const critical = audit.violations.critical?.length || 0;
if (critical > 0) {
console.error(`❌ Deploy blocked: ${critical} critical violations`);
process.exit(1);
}
console.log('✅ Accessibility check passed. Deploying...');
2. Bulk Competitor Monitoring (Python)
Run daily audits on competitor websites and track regression:
import requests
import json
from datetime import datetime
competitors = [
'https://competitor-1.com',
'https://competitor-2.com',
'https://competitor-3.com'
]
headers = {
'Authorization': f"Bearer {os.environ['PAGEBOLT_KEY']}",
'Content-Type': 'application/json'
}
for url in competitors:
res = requests.post(
'https://api.pagebolt.dev/v1/audit',
headers=headers,
json={'url': url, 'options': {'standards': ['wcag21aa']}}
)
audit = res.json()
# Store in database with timestamp
db.collection('audits').insert_one({
'url': url,
'timestamp': datetime.utcnow(),
'critical': len(audit['violations'].get('critical', [])),
'total': audit['violations']['critical_count']
})
# Alert if regression
if audit['violations']['critical'] > BASELINE:
slack.post(f"⚠️ {url} compliance regression: +{delta} new violations")
3. Serverless Weekly Audit (AWS Lambda)
export const handler = async (event) => {
const urls = [
'https://yoursite.com/home',
'https://yoursite.com/products',
'https://yoursite.com/checkout',
];
const audits = await Promise.all(
urls.map(url => fetch('https://api.pagebolt.dev/v1/audit', {
method: 'POST',
headers: { 'Authorization': `Bearer ${process.env.PAGEBOLT_KEY}` },
body: JSON.stringify({ url, options: { standards: ['wcag21aa'] } })
}).then(r => r.json()))
);
// Generate compliance report
const report = {
date: new Date().toISOString(),
total_pages: urls.length,
pages_compliant: audits.filter(a => a.violations.critical?.length === 0).length,
audit_details: audits
};
// Upload to S3
await s3.putObject({
Bucket: 'compliance-reports',
Key: `audit-${Date.now()}.json`,
Body: JSON.stringify(report)
}).promise();
return { statusCode: 200, body: 'Audit complete' };
};
Why Not Self-Hosted Audits?
axe-core self-hosted (on your server):
- 300MB+ Docker image
- ~5–10 seconds per page
- Browser management overhead
- Infrastructure costs at scale
- Manual updates when standards change
PageBolt /audit endpoint:
- <1KB per request
- <1 second per page (cached)
- Zero infrastructure
- Automatic WCAG updates
- 25–100x cheaper at scale
Pricing
- Free tier: 50 audits/month
- Starter: $29/month → 10,000 audits/month
- Team: $99/month → unlimited audits + compliance reporting
Next Steps
- Sign up free: pagebolt.dev/pricing
- Read the full API docs: pagebolt.dev/docs
- Run your first audit:
curl https://api.pagebolt.dev/v1/audit ... - Integrate into CI/CD — deploy only compliant code
Try the API free — 50 audits/month, no credit card required.
Top comments (0)