# LLM Agent Guide: ADA/WCAG Accessibility Testing with Cremote
## Purpose
This document provides LLM coding agents with concrete, actionable guidance for using Cremote's accessibility testing tools to conduct ADA/WCAG compliance audits.
## ⚠️ IMPORTANT: Tool Naming Convention
All cremote MCP tools use the **double suffix** naming pattern: `toolname_cremotemcp_cremotemcp`
**Correct:** `web_run_axe_cremotemcp_cremotemcp`
**Incorrect:** `web_run_axe_cremotemcp`
## Quick Reference
### Token-Efficient Summary Tools (NEW - 2025-10-03)
**🚀 RECOMMENDED FOR SITE-WIDE ASSESSMENTS**
These tools reduce token usage by 85-95% while providing comprehensive, actionable results:
| Tool | Purpose | Token Usage | Replaces |
|------|---------|-------------|----------|
| `web_page_accessibility_report_cremotemcp_cremotemcp` | Comprehensive single-page assessment | ~4k | Multiple tools (95% savings) |
| `web_contrast_audit_cremotemcp_cremotemcp` | Smart contrast check with patterns | ~4k | `web_contrast_check_cremotemcp_cremotemcp` (85% savings) |
| `web_keyboard_audit_cremotemcp_cremotemcp` | Keyboard navigation summary | ~2k | `web_keyboard_test_cremotemcp_cremotemcp` (80% savings) |
| `web_form_accessibility_audit_cremotemcp_cremotemcp` | Form accessibility check | ~2k | Manual form analysis (75% savings) |
**Use these for:**
- Multi-page site assessments (10+ pages possible)
- Initial comprehensive audits
- Token-constrained environments
- Structured, actionable reports
### Tool Selection Matrix
| Testing Need | Primary Tool | Secondary Tool | WCAG Criteria |
|--------------|--------------|----------------|---------------|
| **Comprehensive page audit** | `web_page_accessibility_report_cremotemcp_cremotemcp` ⭐ | - | All automated criteria |
| Comprehensive automated audit | `web_run_axe_cremotemcp_cremotemcp` | - | ~57% of WCAG 2.1 AA |
| **Smart contrast check** | `web_contrast_audit_cremotemcp_cremotemcp` ⭐ | `web_contrast_check_cremotemcp_cremotemcp` | 1.4.3, 1.4.6, 1.4.11 |
| Color contrast issues | `web_contrast_check_cremotemcp_cremotemcp` | `web_gradient_contrast_check_cremotemcp_cremotemcp` | 1.4.3, 1.4.6, 1.4.11 |
| Gradient backgrounds | `web_gradient_contrast_check_cremotemcp_cremotemcp` | - | 1.4.3, 1.4.6, 1.4.11 |
| **Keyboard navigation** | `web_keyboard_audit_cremotemcp_cremotemcp` ⭐ | `web_keyboard_test_cremotemcp_cremotemcp` | 2.1.1, 2.4.7 |
| **Form accessibility** | `web_form_accessibility_audit_cremotemcp_cremotemcp` ⭐ | - | 3.3.2, 4.1.2, 1.3.1 |
| Video/audio captions | `web_media_validation_cremotemcp_cremotemcp` | - | 1.2.2, 1.2.5, 1.4.2 |
| Hover/focus content | `web_hover_focus_test_cremotemcp_cremotemcp` | - | 1.4.13 |
| Text in images | `web_text_in_images_cremotemcp_cremotemcp` | - | 1.4.5, 1.4.9, 1.1.1 |
| Cross-page consistency | `web_cross_page_consistency_cremotemcp_cremotemcp` | - | 3.2.3, 3.2.4, 1.3.1 |
| Sensory instructions | `web_sensory_characteristics_cremotemcp_cremotemcp` | - | 1.3.3 |
| Animations/flashing | `web_animation_flash_cremotemcp_cremotemcp` | - | 2.3.1, 2.2.2, 2.3.2 |
| ARIA validation | `web_enhanced_accessibility_cremotemcp_cremotemcp` | `web_run_axe_cremotemcp_cremotemcp` | 1.3.1, 4.1.2, 2.4.6 |
| Keyboard accessibility | `web_keyboard_test_cremotemcp_cremotemcp` | `web_run_axe_cremotemcp_cremotemcp` | 2.1.1, 2.4.7 |
| Zoom/resize functionality | `web_zoom_test_cremotemcp_cremotemcp` | - | 1.4.4 |
| Responsive design | `web_reflow_test_cremotemcp_cremotemcp` | - | 1.4.10 |
| Visual documentation | `web_screenshot_cremotemcp_cremotemcp` | - | Evidence capture |
| Custom JavaScript testing | `console_command_cremotemcp_cremotemcp` | - | Advanced scenarios |
⭐ = Token-efficient summary tool (recommended for site-wide assessments)
### Recommended Testing Sequences
#### Option 1: Token-Efficient Approach (RECOMMENDED for site-wide assessments)
**Single call per page - ~4k tokens:**
```
1. web_page_accessibility_report_cremotemcp_cremotemcp # Comprehensive assessment
- Includes: axe-core, contrast, keyboard, forms
- Returns: Structured summary with compliance status
- Token usage: ~4k (vs 80k+ with old approach)
```
**For 10 pages: ~40k tokens total (vs 800k+ with old approach)**
#### Option 2: Detailed Testing Approach (for deep dives)
**Use when you need raw data or specific tool features:**
```
1. web_inject_axe_cremotemcp_cremotemcp # Inject axe-core library
2. web_run_axe_cremotemcp_cremotemcp # Run comprehensive automated tests
3. web_contrast_check_cremotemcp_cremotemcp # Detailed contrast analysis
4. web_gradient_contrast_check_cremotemcp_cremotemcp # Gradient background contrast
5. web_media_validation_cremotemcp_cremotemcp # Video/audio caption validation
6. web_hover_focus_test_cremotemcp_cremotemcp # Hover/focus content testing
7. web_text_in_images_cremotemcp_cremotemcp # Text-in-images detection
8. web_sensory_characteristics_cremotemcp_cremotemcp # Sensory instruction detection
9. web_animation_flash_cremotemcp_cremotemcp # Animation/flash detection
10. web_enhanced_accessibility_cremotemcp_cremotemcp # Enhanced ARIA validation
11. web_keyboard_test_cremotemcp_cremotemcp # Keyboard navigation testing
12. web_zoom_test_cremotemcp_cremotemcp # Zoom functionality testing
13. web_reflow_test_cremotemcp_cremotemcp # Responsive design testing
```
**Note:** For multi-page sites, also run:
```
14. web_cross_page_consistency_cremotemcp_cremotemcp # Cross-page consistency
```
#### Option 3: Hybrid Approach (balanced)
**Use summary tools for initial assessment, detailed tools for specific issues:**
```
1. web_page_accessibility_report_cremotemcp_cremotemcp # Initial comprehensive assessment
2. If specific issues found:
a. web_contrast_audit_cremotemcp_cremotemcp # Deep dive on contrast
b. web_keyboard_audit_cremotemcp_cremotemcp # Deep dive on keyboard
c. web_form_accessibility_audit_cremotemcp_cremotemcp # Deep dive on forms
```
## Tool Usage Patterns
### Pattern 1: Token-Efficient Page Assessment (NEW - RECOMMENDED)
```json
// Single call - comprehensive assessment (~4k tokens)
{
"tool": "web_page_accessibility_report_cremotemcp_cremotemcp",
"arguments": {
"tests": ["all"], // or ["wcag", "contrast", "keyboard", "forms"]
"standard": "WCAG21AA",
"timeout": 30
}
}
// Returns structured summary with:
// - compliance_status: COMPLIANT, PARTIAL, NON_COMPLIANT
// - overall_score: 0-100
// - legal_risk: LOW, MEDIUM, HIGH, CRITICAL
// - critical_issues, serious_issues, high_issues, medium_issues
// - contrast_summary, keyboard_summary, form_summary
// - estimated_remediation_hours
```
### Pattern 2: Initial Audit (Traditional Approach)
```json
// Step 1: Inject axe-core
{
"tool": "web_inject_axe_cremotemcp_cremotemcp",
"arguments": {
"timeout": 30
}
}
// Step 2: Run comprehensive tests
{
"tool": "web_run_axe_cremotemcp_cremotemcp",
"arguments": {
"run_only": ["wcag2a", "wcag2aa", "wcag21aa"],
"timeout": 30
}
}
// Step 3: Analyze results and run specialized tests based on findings
```
### Pattern 3: Smart Contrast Audit (NEW - RECOMMENDED)
```json
// Token-efficient contrast check with prioritized failures (~4k tokens)
{
"tool": "web_contrast_audit_cremotemcp_cremotemcp",
"arguments": {
"priority_selectors": ["button", "a", "nav", "footer"],
"threshold": "AA",
"timeout": 10
}
}
// Returns:
// - total_checked, passed, failed, pass_rate
// - critical_failures (top 20 with fixes)
// - failure_patterns (grouped similar issues)
```
### Pattern 4: Contrast-Specific Testing (Traditional)
```json
// For pages with known or suspected contrast issues
{
"tool": "web_contrast_check_cremotemcp_cremotemcp",
"arguments": {
"selector": "body", // Test entire page
"timeout": 10
}
}
// For specific sections
{
"tool": "web_contrast_check_cremotemcp_cremotemcp",
"arguments": {
"selector": ".main-content", // Test specific area
"timeout": 10
}
}
```
### Pattern 5: Smart Keyboard Audit (NEW - RECOMMENDED)
```json
// Token-efficient keyboard assessment (~2k tokens)
{
"tool": "web_keyboard_audit_cremotemcp_cremotemcp",
"arguments": {
"check_focus_indicators": true,
"check_tab_order": true,
"check_keyboard_traps": true,
"timeout": 15
}
}
// Returns:
// - status: PASS, PARTIAL, FAIL
// - total_interactive, focusable
// - issues (categorized by type and severity)
// - recommendation (actionable next steps)
```
### Pattern 6: Keyboard Navigation Testing (Traditional)
```json
{
"tool": "web_keyboard_test_cremotemcp_cremotemcp",
"arguments": {
"timeout": 10
}
}
// Analyze output for:
// - not_focusable: Elements that should be keyboard accessible but aren't
// - no_focus_indicator: Elements missing visible focus indicators
// - keyboard_trap: Elements that trap keyboard focus
```
### Pattern 7: Form Accessibility Audit (NEW)
```json
// Comprehensive form accessibility check (~2k tokens)
{
"tool": "web_form_accessibility_audit_cremotemcp_cremotemcp",
"arguments": {
"form_selector": "", // Empty = all forms
"timeout": 10
}
}
// Returns:
// - forms_found
// - forms[] with:
// - id, fields count
// - issues (missing labels, contrast, etc.)
// - aria_compliance: FULL, PARTIAL, NONE
// - keyboard_accessible, required_fields_marked
```
### Pattern 8: Zoom and Responsive Testing
```json
// Test zoom levels (WCAG 1.4.4)
{
"tool": "web_zoom_test_cremotemcp_cremotemcp",
"arguments": {
"zoom_levels": [1.0, 2.0, 4.0],
"timeout": 10
}
}
// Test responsive breakpoints (WCAG 1.4.10)
{
"tool": "web_reflow_test_cremotemcp_cremotemcp",
"arguments": {
"widths": [320, 768, 1280],
"timeout": 10
}
}
```
### Pattern 9: Visual Documentation
```json
// Capture baseline
{
"tool": "web_screenshot_cremotemcp_cremotemcp",
"arguments": {
"output": "/tmp/baseline.png",
"timeout": 5
}
}
// Capture at 200% zoom
{
"tool": "web_screenshot_cremotemcp_cremotemcp",
"arguments": {
"output": "/tmp/zoom-200.png",
"zoom_level": 2.0,
"timeout": 5
}
}
// Capture mobile view
{
"tool": "web_screenshot_cremotemcp_cremotemcp",
"arguments": {
"output": "/tmp/mobile-320.png",
"width": 320,
"height": 568,
"timeout": 5
}
}
```
### Pattern 10: Gradient Contrast Testing
```json
// Test specific element with gradient background
{
"tool": "web_gradient_contrast_check_cremotemcp_cremotemcp",
"arguments": {
"selector": ".hero-section",
"timeout": 10
}
}
// Test all elements with gradient backgrounds
{
"tool": "web_gradient_contrast_check_cremotemcp_cremotemcp",
"arguments": {
"selector": "body", // Scans entire page
"timeout": 10
}
}
// Analyze output for:
// - worst_case_ratio: Minimum contrast found across gradient
// - best_case_ratio: Maximum contrast found across gradient
// - wcag_aa_pass: Whether it meets WCAG AA standards
// - wcag_aaa_pass: Whether it meets WCAG AAA standards
```
### Pattern 11: Media Validation
```json
// Validate all video/audio elements on page
{
"tool": "web_media_validation_cremotemcp_cremotemcp",
"arguments": {
"timeout": 10
}
}
// Analyze output for:
// - missing_captions: Videos without caption tracks
// - missing_audio_descriptions: Videos without audio description tracks
// - inaccessible_tracks: Track files that cannot be loaded
// - autoplay_violations: Videos that autoplay without controls
```
### Pattern 12: Hover/Focus Content Testing
```json
// Test all hover/focus triggered content
{
"tool": "web_hover_focus_test_cremotemcp_cremotemcp",
"arguments": {
"timeout": 10
}
}
// Analyze output for:
// - not_dismissible: Content that cannot be dismissed with Escape key
// - not_hoverable: Tooltip disappears when hovering over it
// - not_persistent: Content disappears too quickly
// - native_title_tooltip: Using native title attribute (violation)
```
### Pattern 13: Text-in-Images Detection
```json
// Detect text embedded in images using OCR
{
"tool": "web_text_in_images_cremotemcp_cremotemcp",
"arguments": {
"timeout": 30 // OCR is CPU-intensive, allow more time
}
}
// Analyze output for:
// - missing_alt: Images with text but no alt text
// - insufficient_alt: Images with text but inadequate alt text
// - detected_text: Actual text found in the image
// - recommendations: Specific suggestions for each image
```
### Pattern 14: Cross-Page Consistency
```json
// Check consistency across multiple pages
{
"tool": "web_cross_page_consistency_cremotemcp_cremotemcp",
"arguments": {
"urls": [
"https://example.com/",
"https://example.com/about",
"https://example.com/contact",
"https://example.com/services"
],
"timeout": 10 // Per page
}
}
// Analyze output for:
// - common_navigation: Links present on all pages
// - inconsistent_pages: Pages missing common navigation
// - landmark_issues: Missing or multiple main/header/footer landmarks
// - navigation_issues: Inconsistent navigation structure
```
### Pattern 15: Sensory Characteristics Detection
```json
// Detect instructions relying on sensory characteristics
{
"tool": "web_sensory_characteristics_cremotemcp_cremotemcp",
"arguments": {
"timeout": 10
}
}
// Analyze output for:
// - color_only: "Click the red button" (violation)
// - shape_only: "Press the round icon" (violation)
// - sound_only: "Listen for the beep" (violation)
// - location_visual: "See above" (warning)
// - size_only: "Click the large button" (warning)
```
### Pattern 16: Animation/Flash Detection
```json
// Detect animations and flashing content
{
"tool": "web_animation_flash_cremotemcp_cremotemcp",
"arguments": {
"timeout": 10
}
}
// Analyze output for:
// - flashing_content: Content flashing > 3 times per second (violation)
// - no_pause_control: Autoplay animation > 5s without controls (violation)
// - rapid_animation: Fast infinite animations (warning)
// - animation_types: CSS, GIF, video, canvas, SVG
```
### Pattern 17: Enhanced ARIA Validation
```json
// Perform enhanced accessibility tree analysis
{
"tool": "web_enhanced_accessibility_cremotemcp_cremotemcp",
"arguments": {
"timeout": 10
}
}
// Analyze output for:
// - missing_accessible_name: Interactive elements without labels
// - aria_hidden_interactive: Interactive elements with aria-hidden
// - invalid_tabindex: Elements with invalid tabindex values
// - landmark_issues: Multiple landmarks without distinguishing labels
```
## Interpreting Results
### Axe-Core Results
```json
{
"violations": [
{
"id": "color-contrast",
"impact": "serious", // critical, serious, moderate, minor
"description": "Elements must have sufficient color contrast",
"nodes": [
{
"html": "
Low contrast text
",
"target": [".text-gray"],
"failureSummary": "Fix any of the following:\n Element has insufficient color contrast of 3.2:1 (foreground color: #808080, background color: #ffffff, font size: 12.0pt (16px), font weight: normal). Expected contrast ratio of 4.5:1"
}
]
}
],
"passes": [...], // Tests that passed
"incomplete": [...], // Tests requiring manual review
"inapplicable": [...] // Tests not applicable to this page
}
```
**Action Priority:**
1. **Critical/Serious violations** - Fix immediately
2. **Moderate violations** - Fix in current sprint
3. **Minor violations** - Fix when convenient
4. **Incomplete** - Manually review and test
5. **Passes** - Document for compliance
### Contrast Check Results
```
WCAG AA Violations:
- p:nth-of-type(3): 3.2:1 (required: 4.5:1)
Text: This text has insufficient contrast
Colors: rgb(128, 128, 128) on rgb(255, 255, 255)
```
**Remediation:**
- Darken foreground color or lighten background
- Use contrast ratio calculator to find compliant colors
- Test with `web_contrast_check_cremotemcp_cremotemcp` after fixes
### Keyboard Test Results
```
High Severity Issues:
- not_focusable: Interactive element is not keyboard focusable
Element: div[role="button"]
- no_focus_indicator: Interactive element lacks visible focus indicator
Element: button.submit-btn
```
**Remediation:**
- `not_focusable`: Add `tabindex="0"` or use semantic HTML (`