A comprehensive toolkit for generating OpenACR-compliant accessibility conformance reports from Drupal.org issues. This automated workflow extracts WCAG-related issues, analyzes them with AI, consolidates findings by WCAG Success Criteria, and produces government-compliant accessibility reports.
# 1. Clone and setup
git clone <repository-url>
cd drupal-acr
npm install
# 2. Set up API key for AI analysis
cp .env.example .env
# Edit .env and add: GEMINI_API_KEY=your-api-key-here
# 3. Run complete workflow
node run-acr-workflow.js
# 4. Validate output
npx openacr validate -f results/drupal-openacr_*.yaml
Get your Gemini API key from: https://aistudio.google.com/app/apikey
File: extract-wcag-issues.js
- Extracts all WCAG-tagged issues from Drupal.org
- Processes 80+ WCAG 2.1/2.2 Success Criteria
- Collects comprehensive metadata (status, priority, comments, etc.)
- Bypasses bot detection with intelligent retry strategies
- Output:
results/wcag-detailed-issues_YYYY-MM-DD_HH-MM.csv
File: generate-issue-summaries.js
- Uses Google Gemini AI to analyze each issue
- Generates professional ACR (Accessibility Conformance Report) notes
- Creates technical developer guidance for issue resolution
- Assesses title accuracy and suggests improvements
- Output:
results/wcag-issue-summaries_YYYY-MM-DD_HH-MM.csv
File: consolidate-wcag-summaries.js
- Groups individual issues by WCAG Success Criteria
- Creates master assessments with AI-powered consolidation
- Determines compliance levels (SUPPORTED, PARTIALLY_SUPPORTED, NOT_SUPPORTED)
- Provides real-time console output of assessments
- Output:
results/wcag-acr-consolidated_YYYY-MM-DD_HH-MM.csv
File: convert-to-openacr.js
- Converts consolidated data to government-compliant OpenACR YAML
- Applies positive accessibility statements for well-supported criteria
- Handles WCAG 2.2 compatibility (with future-proofing)
- Uses customizable templates for organization-specific branding
- Output:
results/drupal-openacr_YYYY-MM-DD_HH-MM.yaml
The run-acr-workflow.js
script orchestrates all four steps:
# Run complete workflow
node run-acr-workflow.js
# Run specific step only
node run-acr-workflow.js --step 2
# Run from step 3 to end
node run-acr-workflow.js --from 3
# Skip step 1 (use existing data)
node run-acr-workflow.js --skip 1
# Dry run (show execution plan)
node run-acr-workflow.js --dry-run
# Verbose output
node run-acr-workflow.js --verbose
# Help
node run-acr-workflow.js --help
Drupal.org Issues β Extract β AI Analysis β Consolidate β OpenACR YAML
π π₯ π€ π π
- Raw Issues (300+ individual accessibility issues)
- Detailed CSV (comprehensive metadata per issue)
- AI Summaries (professional ACR notes + dev guidance)
- Consolidated ACR (assessments by WCAG Success Criteria)
- OpenACR YAML (government-compliant accessibility report)
drupal-acr/
βββ extract-wcag-issues.js # Step 1: Extract from Drupal.org
βββ generate-issue-summaries.js # Step 2: AI-powered analysis
βββ consolidate-wcag-summaries.js # Step 3: Consolidate by WCAG SC
βββ convert-to-openacr.js # Step 4: Generate OpenACR YAML
βββ run-acr-workflow.js # Master workflow orchestrator
βββ drupal-template.yaml # Customizable OpenACR template
βββ .env.example # Environment variables template
βββ package.json # Dependencies and scripts
βββ README.md # This file
βββ results/ # Generated CSV and YAML files
βββ wcag-detailed-issues_*.csv
βββ wcag-issue-summaries_*.csv
βββ wcag-acr-consolidated_*.csv
βββ drupal-openacr_*.yaml
Create a .env
file with:
GEMINI_API_KEY=your-actual-api-key-here
Edit drupal-template.yaml
to customize:
- Product information
- Author/organization details
- Report descriptions
- Contact information
Modify the naList
array in convert-to-openacr.js
to specify WCAG criteria that should be marked as "Not Applicable":
const naList = ['1.2.4', '1.2.5', '2.1.4', '2.2.1', '2.2.2', '2.3.1', '2.5.4', '3.3.8', '4.1.1'];
Column | Description |
---|---|
WCAG SC | WCAG Success Criteria (e.g., wcag111, wcag143) |
Issue ID | Drupal.org issue number |
Issue Title | Full issue title |
Issue URL | Direct link to issue |
Project | Drupal project name |
Status | Current status (Active, Fixed, etc.) |
Priority | Issue priority (Critical, Major, etc.) |
Component | Affected Drupal component |
Version | Target Drupal version |
Reporter | Issue reporter username |
Created | Creation date |
Updated | Last update date |
Comments | Number of comments |
Has Fork | Fork/MR availability |
Last Commenter | Most recent commenter |
Extracted At | Data extraction timestamp |
Column | Description |
---|---|
Issue ID | Drupal.org issue identifier |
ACR Note | Professional accessibility barrier description |
Developer Note | Technical guidance for resolution |
Title Assessment | Title accuracy evaluation |
Processed At | AI analysis timestamp |
Column | Description |
---|---|
WCAG SC | WCAG Success Criteria |
ACR Assessment | Compliance level (SUPPORTED/PARTIALLY_SUPPORTED/NOT_SUPPORTED) |
ACR Summary | Consolidated assessment for the criteria |
Issue Count | Number of related issues |
Issue IDs | Comma-separated list of issue IDs |
Processed At | Consolidation timestamp |
- Professional compliance language for accessibility reports
- Clear barrier descriptions with user impact analysis
- Section 508 disability impact mapping (vision, hearing, motor, cognitive)
- Browser-specific limitations and compatibility notes
- WCAG Success Criteria references
- Patch/merge request analysis from issue comments
- Technical next steps and recommended actions
- Differentiation between current and outdated solutions
- Browser-specific issues and API change considerations
- Blocker identification and review status
- 85+ pre-written positive descriptions for WCAG criteria
- Automatically applied to well-supported features
- Highlights accessibility achievements alongside problems
- Provides balanced view in compliance reports
Step | Runtime | API Cost | Output Size |
---|---|---|---|
1. Extract | 15-30 min | Free | ~300 issues |
2. AI Analysis | 20-30 min | $3-15 | ACR summaries |
3. Consolidate | 2-5 min | $2-8 | 45 criteria |
4. Convert | <1 min | Free | OpenACR YAML |
Total: ~45-60 minutes, $5-25 in API costs
- Progressive retry strategies with exponential backoff
- Bot detection bypass with tool-based user agents
- Comprehensive error handling and recovery
- Session management and rate limiting
- OpenACR CLI validation integration
- Government schema compliance
- WCAG 2.2 future-proofing with clear TODO markers
- Comprehensive data validation and error checking
- Real-time progress reporting with colored console output
- Helpful error messages and troubleshooting guidance
- Flexible command-line options for different use cases
- Automatic file management with timestamped outputs
The generated OpenACR YAML files are fully compliant with:
- Section 508 accessibility requirements
- WCAG 2.1 Level A/AA standards
- GSA OpenACR schema specifications
- Federal accessibility reporting guidelines
Validated with: npx openacr validate -f results/drupal-openacr_*.yaml
Missing API Key:
# Set environment variable
export GEMINI_API_KEY="your-key-here"
# Or create .env file
echo "GEMINI_API_KEY=your-key-here" > .env
Rate Limiting:
- Built-in delays respect API quotas
- Automatic retry with exponential backoff
- Progress is saved between runs
No Input Data:
- Run steps in order (1β2β3β4)
- Use
--from
flag to resume from specific step - Check
results/
directory for existing files
OpenACR Validation Errors:
- Ensure complete workflow execution
- Check WCAG 2.2 criteria handling
- Validate template customizations
- Fork the repository
- Create a feature branch
- Test with sample data
- Submit pull request with clear description
[License information here]
- Issues: Create GitHub issue with error details
- API Key: https://aistudio.google.com/app/apikey
- OpenACR: https://acreditor.section508.gov/
- WCAG Guidelines: https://www.w3.org/WAI/WCAG21/quickref/