validate_all_accessibility
Run comprehensive accessibility tests using Axe and optional WAVE integration to identify WCAG compliance issues and improve website accessibility for all users.
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:127-156 (handler)Core handler function that implements 'validate_all_accessibility' by orchestrating Axe (always) and optional WAVE accessibility tests, aggregating violations./** * Run all accessibility tests */ 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:408-415 (handler)MCP server tool dispatch handler case for 'validate_all_accessibility', validates args 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:247-259 (registration)Tool registration in the tools array provided to MCP server.{ 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:88-92 (schema)Zod schema for validating tool arguments before calling the handler.const AllAccessibilityArgsSchema = z.object({ url: z.string().url(), waveApiKey: z.string().optional(), wcagLevel: z.string().optional(), });
- src/orchestrator/run-all.ts:40-49 (schema)TypeScript interface defining the output structure of the accessibility validation results.export interface AllAccessibilityResult { url: string; timestamp: string; wave?: WAVEResult; axe?: AxeResult; summary: { tools_run: string[]; total_violations: number; }; }