A Python-based accessibility toolkit that automatically scans websites for accessibility issues, flags problems such as missing alt text, poor color contrast, and broken heading structures, and provides actionable suggestions for fixes.
Accessible websites are crucial for users with disabilities including:
- Visual impairments: Screen readers, high contrast needs, color blindness
- Auditory impairments: Deaf or hard-of-hearing users
- Cognitive impairments: Learning disabilities, attention disorders
- Motor impairments: Limited mobility, tremors, paralysis
- Missing alt text for images
- Poor color contrast ratios
- Improper heading hierarchy
- Inaccessible forms and navigation
- Non-descriptive link text
- Missing ARIA labels
- Keyboard navigation issues
- ADA Compliance: Americans with Disabilities Act requirements
- Section 508: Federal accessibility standards
- WCAG Guidelines: Web Content Accessibility Guidelines
- Inclusive Design: Ensuring equal access for all users
The Pythonic Accessibility Toolkit provides an automated solution for developers to detect and fix accessibility issues before they reach production. It integrates seamlessly into development workflows:
- Local Testing: Scan during development
- Pre-deployment Checks: Validate before going live
- CI/CD Pipelines: Automated accessibility testing
- Lightweight Design: Python-first with minimal dependencies
- Actionable Reports: Clear issue descriptions and fix suggestions
- Python: Core logic and automation
- Pyppeteer: Headless browser control for page rendering
- WAVE API: Accessibility evaluation engine
- BeautifulSoup: HTML parsing and analysis
- Requests: HTTP communication
- Accept URL(s) for scanning
- Launch headless browser and render pages
- Run automated accessibility checks via WAVE API
- Parse and categorize issues by type and severity
- Generate comprehensive reports with fix suggestions
- Comprehensive Accessibility Checks: Alt text, color contrast, heading structure, forms, links, ARIA, landmarks, and keyboard navigation
- Multiple Output Formats: HTML, JSON, CSV, and plain text reports
- Extensible Architecture: Easy to add custom accessibility checks
- Async Support: Efficient concurrent scanning of multiple URLs
- Professional Reports: Detailed findings with actionable suggestions
- Command Line Interface: Quick scanning from terminal
- Configuration Management: YAML-based settings
- Unit Tests: Reliable and maintainable code
- Real-Time Scanning: Instant accessibility analysis on any webpage
- Smart Auto-Fixes: Temporary improvements for common issues
- Visual Indicators: Clear highlighting of accessibility problems
- User-Friendly Interface: Intuitive popup with issue categorization
- Export Functionality: Generate reports for team review
- Customizable Settings: Personalized accessibility experience
- Cross-Browser Support: Works on Chrome, Edge, and Firefox
- Privacy-First Design: No data collection, local processing only
# Clone the repository
git clone https://github.com/yourusername/pythonic-accessibility-toolkit.git
cd pythonic-accessibility-toolkit
# Install dependencies
pip install -r requirements.txt
# Set up WAVE API key (optional, for enhanced features)
export WAVE_API_KEY="your_api_key_here"from accessibility_toolkit import AccessibilityScanner
# Initialize scanner
scanner = AccessibilityScanner()
# Scan a single URL
results = scanner.scan_url("https://example.com")
# Scan multiple URLs
urls = ["https://example.com", "https://test.com"]
results = scanner.scan_multiple(urls)
# Generate report
scanner.generate_report(results, output_format="html")The project also includes a browser extension for real-time accessibility scanning:
- Install the extension from the
browser-extension/folder - Click the extension icon on any webpage
- Scan for issues with one click
- Apply temporary fixes to improve accessibility
- Export reports for team review
See Browser Extension Documentation for detailed installation and usage instructions.
# Scan a single URL
python -m accessibility_toolkit scan https://example.com
# Scan multiple URLs from file
python -m accessibility_toolkit scan --urls urls.txt
# Generate HTML report
python -m accessibility_toolkit scan https://example.com --output html
# Custom configuration
python -m accessibility_toolkit scan https://example.com --config config.yamlReports include:
- Issue Type: Specific accessibility problem identified
- Severity Level: Critical, Moderate, or Low priority
- Location: Page element and context
- Suggested Fix: Step-by-step guidance for developers
- WCAG Reference: Relevant accessibility guidelines
π¨ Critical Issues (3)
βββ Missing alt text for image: logo.png
βββ Insufficient color contrast: 2.1:1 (requires 4.5:1)
βββ Missing form label: email input
β οΈ Moderate Issues (5)
βββ Improper heading hierarchy: H1 β H3
βββ Non-descriptive link: "Click here"
βββ Missing ARIA label: navigation menu
from accessibility_toolkit.checks import BaseCheck
class CustomCheck(BaseCheck):
def check(self, page_content):
# Your custom accessibility logic
issues = []
# ... implementation
return issues# GitHub Actions example
- name: Accessibility Check
run: |
python -m accessibility_toolkit scan ${{ github.event.inputs.url }}
python -m accessibility_toolkit generate-report --format html- Scan depth and page selection
- Output formats (JSON, CSV, HTML, PDF)
- Custom issue severity thresholds
- Team-specific reporting templates
We welcome contributions from the community! Here's how you can help:
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Submit a pull request
- Issues: Report bugs or request features
- Discussions: Join accessibility conversations
- Documentation: Help improve guides and examples
By contributing to this toolkit, you're helping:
- Make the web more accessible for millions of users
- Educate developers about accessibility best practices
- Create tools that benefit the entire development community
- Ensure equal access to digital content for everyone
This project is licensed under the MIT License - see the LICENSE file for details.
- WAVE Web Accessibility Evaluation Tool
- Web Content Accessibility Guidelines (WCAG)
- The accessibility community for ongoing guidance and feedback
Together, let's build a more accessible web for everyone! πβΏ