validate_all_accessibility
Run comprehensive accessibility tests using Axe and WAVE to identify WCAG compliance issues on websites for improved user experience.
Instructions
Run all accessibility tests (Axe + optionally WAVE if API key provided).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ||
| waveApiKey | No | Optional WAVE API key | |
| wcagLevel | No | WCAG level for Axe |
Implementation Reference
- src/orchestrator/run-all.ts:130-156 (handler)Core handler function implementing 'validate_all_accessibility' tool. Runs Axe accessibility analysis always, and WAVE if API key provided. Aggregates results and counts total violations.export async function runAllAccessibility( url: string, options: AccessibilityTestOptions = {} ): Promise<AllAccessibilityResult> { const results: AllAccessibilityResult = { url, timestamp: new Date().toISOString(), summary: { tools_run: [], total_violations: 0, }, }; // Always run Axe (free, open source) results.axe = await analyzeAxe(url, options.axe || {}); results.summary.tools_run.push('axe'); results.summary.total_violations += results.axe.violations; // Optional: WAVE (requires API key) if (options.wave?.apiKey) { results.wave = await analyzeWAVE(url, options.wave); results.summary.tools_run.push('wave'); results.summary.total_violations += results.wave.errors + results.wave.contrast_errors; } return results; }
- index.ts:248-258 (registration)MCP tool registration including name, description, and input schema definition.name: 'validate_all_accessibility', description: 'Run all accessibility tests (Axe + optionally WAVE if API key provided).', inputSchema: { type: 'object', properties: { url: { type: 'string' }, waveApiKey: { type: 'string', description: 'Optional WAVE API key' }, wcagLevel: { type: 'string', description: 'WCAG level for Axe' }, }, required: ['url'], },
- index.ts:408-414 (handler)MCP server request handler switch case for the tool, validates arguments and delegates to runAllAccessibility.case 'validate_all_accessibility': { const validatedArgs = AllAccessibilityArgsSchema.parse(args); const result = await runAllAccessibility(validatedArgs.url, { wave: validatedArgs.waveApiKey ? { apiKey: validatedArgs.waveApiKey } : undefined, axe: { wcagLevel: validatedArgs.wcagLevel }, }); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
- index.ts:88-92 (schema)Zod schema for input validation of the tool arguments.const AllAccessibilityArgsSchema = z.object({ url: z.string().url(), waveApiKey: z.string().optional(), wcagLevel: z.string().optional(), });
- src/orchestrator/run-all.ts:19-22 (schema)TypeScript interface defining options for accessibility tests.export interface AccessibilityTestOptions { wave?: { apiKey: string }; axe?: { wcagLevel?: string }; }