An AI-powered accessibility bug logging system that automatically generates detailed bug reports based on screenshots, issue descriptions, and WCAG failure classifications. The system learns from training examples to improve accuracy over time.
- Multi-AI Provider Support: OpenAI GPT-4 Vision, Google Gemini, and Anthropic Claude
- Learning System: Improves accuracy by learning from training examples
- Screenshot Analysis: Analyzes uploaded screenshots for accessibility issues
- WCAG Compliance: Maps issues to specific WCAG success criteria
- Modern UI: Beautiful, responsive web interface
- Training Management: Add, view, and manage training examples
- Real-time Generation: Instant bug report generation with AI
Link 🔗: https://accessibility-ai-agent.onrender.com/
- Node.js (v14 or higher)
- npm or yarn
- API keys for your chosen AI provider
-
Clone or download the project
# If you have the files, navigate to the project directory cd "Bug Logging Project"
-
Install dependencies
npm install
-
Configure environment variables
- Rename
config.env
to.env
or copy the contents - Update the API keys in the configuration file:
# Choose your AI provider: openai, gemini, anthropic AI_PROVIDER=openai # API Keys (add your actual keys) OPENAI_API_KEY=your_openai_key_here GEMINI_API_KEY=your_gemini_key_here ANTHROPIC_API_KEY=your_anthropic_key_here
- Rename
-
Initialize training data
npm run init-training
-
Start the server
npm run dev
-
Access the application
- Open your browser and go to
http://localhost:3000
- Open your browser and go to
The system supports three AI providers:
- Best for: High-quality, detailed reports
- Setup: Add your OpenAI API key to
OPENAI_API_KEY
- Model: Uses
gpt-4-vision-preview
- Best for: Cost-effective, good performance
- Setup: Add your Gemini API key to
GEMINI_API_KEY
- Model: Uses
gemini-pro-vision
- Best for: Advanced reasoning and analysis
- Setup: Add your Anthropic API key to
ANTHROPIC_API_KEY
- Model: Uses
claude-3-opus-20240229
# AI Provider Configuration
AI_PROVIDER=openai # openai, gemini, anthropic
OPENAI_API_KEY=your_key_here
GEMINI_API_KEY=your_key_here
ANTHROPIC_API_KEY=your_key_here
# Server Configuration
PORT=3000
NODE_ENV=development
# File Upload Settings
MAX_FILE_SIZE=10485760 # 10MB in bytes
UPLOAD_PATH=uploads/
# Training Data
TRAINING_DATA_PATH=./training-data.json
- Upload Screenshot: Select a screenshot of the accessibility issue
- Describe Issue: Enter a one-liner description of the problem
- Select WCAG Failure: Choose the appropriate WCAG success criteria
- Add Context (Optional): Include URL and test environment details
- Generate Report: Click "Generate Bug Report" to create a detailed report
- Fill Training Form: Provide issue description, WCAG failure, and full report
- Submit: Add the example to improve AI accuracy
- View Examples: See all training examples in the bottom section
The system comes with 10 pre-loaded training examples covering:
- Narrator blank announcements (WCAG 3.2.4)
- Aria-hidden misuse (WCAG 1.3.1)
- Focus order issues (WCAG 2.4.3)
- Missing alt text (WCAG 1.1.1)
- Contrast violations (WCAG 1.4.3)
- Heading structure (WCAG 1.3.1)
- Form labels (WCAG 3.3.2)
- Keyboard traps (WCAG 2.1.2)
- Color dependency (WCAG 1.4.1)
- Aria live regions (WCAG 4.1.3)
Bug Logging Project/
├── accessibility-ai.js # Core AI agent class
├── server.js # Express server and API routes
├── init-training-data.js # Training data initialization
├── package.json # Dependencies and scripts
├── config.env # Environment configuration
├── public/
│ └── index.html # Web interface
├── uploads/ # Screenshot uploads (auto-created)
├── training-data/ # Training data directory (auto-created)
└── training-data.json # Training examples database
POST /api/generate-report
Content-Type: multipart/form-data
Parameters:
- screenshot: Image file
- oneliner: Issue description
- wcag: WCAG failure code
- url: URL (optional)
- environment: Test environment (optional)
POST /api/training/add
Content-Type: application/json
Body:
{
"one_liner": "Issue description",
"wcag_failure": "1.1.1",
"full_report": "Complete bug report"
}
GET /api/training/examples
GET /api/health
The AI generates reports in this exact format:
User Impact:
[Specific impact on users with disabilities]
Test Environment:
[OS version, browser version, assistive technology version]
Pre-requisite:
[System settings and browser configurations needed]
Steps to Reproduce:
[Numbered steps to reproduce the issue]
Actual Result:
[What actually happens - the bug behavior]
Expected Result:
[What should happen - the correct behavior]
MAS Reference:
[WCAG success criteria reference]
Please refer to attached video in attachment tab for more information about the bug.
-
Quick Start
npm install npm run init-training npm run dev
-
Add Your API Key
- Edit
config.env
and add your AI provider API key - Choose your preferred AI provider
- Edit
-
Test the System
- Upload a screenshot
- Enter a test issue description
- Select a WCAG failure
- Generate your first bug report
-
Improve Accuracy
- Add training examples based on your testing style
- The AI learns from these examples
- More examples = better accuracy
npm run dev
npm start
npm test
- Image Optimization: Use compressed images for faster uploads
- Training Examples: Add diverse examples for better accuracy
- API Limits: Monitor your AI provider's rate limits
- File Cleanup: Uploaded files are automatically cleaned after 24 hours
- File uploads are validated for type and size
- API keys are stored in environment variables
- Uploaded files are automatically cleaned up
- CORS is enabled for cross-origin requests
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License.
For issues and questions:
- Check the console logs for error messages
- Verify your API keys are correct
- Ensure all dependencies are installed
- Check that the server is running on the correct port
The system has been trained on real accessibility testing scenarios and can generate professional-quality bug reports that match industry standards. The learning system continuously improves accuracy as you add more training examples.
Happy Accessibility Testing! 🎯