Accessibility Audit Agent
Accessibility Audit Agent
Audit any website for WCAG 2.1 accessibility compliance using Firecrawl, then use AI tools to analyze issues by severity, check color contrast, validate heading structure, generate alt text, and create prioritized remediation plans with visual tool outputs.
Problems solved
- Audit websites for WCAG 2.1 accessibility issues with Firecrawl
- Check color contrast against AA and AAA thresholds
- Validate heading hierarchy and ARIA landmarks
- Generate alt text suggestions and prioritized remediation plans
- Export audit findings for engineering handoff
Use cases
- Website accessibility auditing
- WCAG compliance reviews
- Remediation planning for product teams
- Alt text generation workflows
- Accessibility report generation
Setup
Requirements, wiring steps, and what this pattern adds to your project.
Getting started
Pick how you want to pull this pattern in. Then wire env vars and routes the same way.
- 1
Download → Next.js app
Use Download → Next.js app in the preview toolbar. You get a zip scaffold (Pro downloads rewrite preview `/view/.../api/*` paths to `/api/*` automatically).
- 2
Extract the zip and install dependencies
Unzip the archive, then run `pnpm install` (or npm / yarn) in the project folder.
- 3
Fill .env.local
The download includes .env.local placeholders when needed. Add real values for: GOOGLE_GENERATIVE_AI_API_KEY, FIRECRAWL_API_KEY.
- 4
Customize the agent and tool files
Adapt prompts, tools, and stop conditions in the generated project for your product.
- 5
Run the app and open the pattern route
Run `pnpm dev`, open the setup/checklist page if present, then navigate to the generated pattern route and verify responses.
Environment variables
Capabilities
AI SDK APIs
useChatgatewayToolLoopAgenttoolhasToolCallstepCountIscreateAgentUIStreamResponseInferAgentUIMessageDefaultChatTransportUIMessagegenerateObjectProviders
External services
Files added
14 filesapp/page.tsxapp/layout.tsxapp/api/a11y-agent/route.tslib/actions.tslib/a11y-types.tslib/rate-limit.tslib/ai/a11y-agent.tslib/ai/tools/audit-accessibility.tslib/ai/tools/check-color-contrast.tslib/ai/tools/analyze-heading-structure.tslib/ai/tools/generate-alt-text.tslib/ai/tools/create-remediation-plan.tslib/ai/tools/export-audit-report.tsREADME.md
Dependencies
15 totalnpm packages
8
Registry components
Critical files
a11y-agent/route.tsAPI route using createAgentUIStreamResponse with pageContext, includes server-side rate limiting.
ai/a11y-agent.tsToolLoopAgent with 6 accessibility audit tools, callOptionsSchema + prepareCall for page context injection, and WCAG-specialized instructions.
tools/audit-accessibility.tsFull WCAG 2.1 audit tool analyzing page context for issues grouped by severity.
tools/check-color-contrast.tsColor contrast checking tool testing WCAG compliance (AA: 4.5:1, AAA: 7:1).
tools/analyze-heading-structure.tsHeading hierarchy and ARIA landmark validation tool.
tools/generate-alt-text.tsAI-powered alt text suggestion tool for images based on context.
tools/create-remediation-plan.tsPrioritized fix list tool with effort estimates for accessibility remediation.
tools/export-audit-report.tsAudit report export tool supporting PDF, JSON, CSV, or GitHub Issues markdown formats.
Requirements
- Complexity
- Advanced
- Setup time
- ~10 minutes
- Node
- 24+
- Memory
- 256MB







