An AI-enhanced, open-source Python framework for automated accessibility testing that combines rule-based WCAG validation with intelligent explanations and code remediation.
- Automated WCAG Testing: Rule-based accessibility checks using axe-core integration
- AI-Enhanced Explanations: Plain-language explanations of accessibility issues
- Code Remediation: Automated fix suggestions for common violations
- Multiple Platforms: Web (Playwright), Mobile (Appium - coming soon)
- Flexible Reporting: JSON, HTML, and Markdown output formats
- CI/CD Ready: Exit codes and thresholds for pipeline integration
- Privacy-First: Offline AI mode with rule-based explanations
- Extensible: Plugin architecture for custom modules
# Clone the repository
git clone https://github.com/yourusername/intelligent-accessibility-assistant.git
cd intelligent-accessibility-assistant
# Install dependencies
pip install -e .
# Install Playwright browsers
playwright install chromium# Test a website
iaa test https://example.com
# Generate JSON report
iaa test https://example.com --format json --output report.json
# Disable AI enhancements
iaa test https://example.com --no-ai
# Run in CI mode with failure threshold
iaa test https://example.com --fail-on critical --fail-threshold 0- Python 3.9+
- Playwright (for web testing)
- Optional: OpenAI/Anthropic API key (for online AI mode)
iaa/
βββ core/
β βββ models.py # Data models (AccessibilityIssue, TestResult)
β βββ module.py # Base module interface
β βββ engine.py # Orchestration engine
βββ modules/
β βββ web.py # Web accessibility module (Playwright + axe-core)
β βββ ai/
β βββ explainer.py # AI-powered issue explanations
β βββ fixer.py # Code remediation generator
β βββ enhancer.py # AI enhancement wrapper
βββ reporters/
β βββ json_reporter.py # JSON output
β βββ html_reporter.py # HTML report generation
βββ cli.py # Command-line interface
- Module Execution: The engine orchestrates one or more accessibility modules (web, mobile, etc.)
- Rule-Based Testing: Each module runs automated checks (e.g., axe-core for web)
- Issue Collection: Violations are collected as
AccessibilityIssueobjects - AI Enhancement (optional): Issues are enhanced with:
- Plain-language explanations
- Impact descriptions
- Suggested code fixes
- Reporting: Results are formatted and output in the requested format
- CI Integration: Exit codes indicate pass/fail based on thresholds
Create custom modules by extending AccessibilityModule:
from iaa.core.module import AccessibilityModule
from iaa.core.models import AccessibilityIssue
class CustomModule(AccessibilityModule):
@property
def name(self) -> str:
return "custom_module"
async def run(self, target: str) -> List[AccessibilityIssue]:
# Your testing logic here
return []| Option | Description | Default |
|---|---|---|
--format |
Output format (json, html, markdown) | html |
--output |
Output file path | accessibility-report.html |
--ai-enabled |
Enable AI enhancements | True |
--offline-ai |
Use offline AI mode | True |
--fail-on |
Fail on severity level | critical |
--fail-threshold |
Maximum issues before failure | 0 |
--headless |
Run browser in headless mode | True |
Offline Mode (default):
- Uses rule-based explanations and template fixes
- No external API calls
- Privacy-preserving
- No API key required
Online Mode (coming soon):
- Integrates with OpenAI, Anthropic, or local LLMs
- Context-aware explanations
- Intelligent code remediation
- Requires API key
Beautiful, interactive HTML report with:
- Summary dashboard
- Severity-coded issues
- AI explanations and fixes
- WCAG references
Structured data for programmatic processing:
{
"target": "https://example.com",
"summary": {
"total_issues": 5,
"critical": 2,
"serious": 1
},
"issues": [...]
}- Data Masking: Sensitive data is masked before AI processing
- Offline Mode: Default mode requires no external API calls
- No PII: Framework avoids collecting personally identifiable information
- Audit Logging: AI usage is logged for compliance
# Run tests
pytest
# Run with coverage
pytest --cov=iaa- Web accessibility module (Playwright + axe-core)
- AI explanation engine
- AI fix generator
- HTML/JSON reporting
- Mobile accessibility module (Appium)
- Screen reader simulation
- Vision-based UI analysis
- Online AI integration (OpenAI, Anthropic)
- Markdown reporter
- VPAT generation
- Git repository scanning
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
MIT License - see LICENSE for details.
- axe-core for accessibility rules
- Playwright for browser automation
- Typer for CLI framework
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Made with β€οΈ for a more accessible web