This repository is configured to automatically scan and fix accessibility (ADA) issues in Salesforce components when Pull Requests are created or updated.
-
Trigger: The workflow automatically runs when:
- A new PR is opened
- An existing PR is updated
- Changes are made to LWC, Aura, or Visualforce components
-
Scan: GitHub Copilot CLI analyzes the changed files for accessibility issues including:
- Missing ARIA attributes
- Improper keyboard navigation
- Color contrast problems
- Missing alt text for images
- Form accessibility issues
- Focus management problems
-
Fix: The system automatically applies fixes for common accessibility issues
-
Commit: Fixed files are automatically committed back to the PR branch
-
Report: A comment is added to the PR with details about the fixes applied
.github/workflows/ada-compliance-check.yml- Main GitHub Actions workflow.github/scripts/ada-compliance-fix.sh- Script that performs the ADA fixes.github/COPILOT_ADA_CONFIG.md- Configuration and patterns for Copilot CLI
Local Machine: No special installations required! The workflow runs entirely on GitHub's servers.
GitHub Repository: Just push your Salesforce project to GitHub.
The workflow uses the default GITHUB_TOKEN which is automatically provided by GitHub Actions. No additional secrets are required.
The workflow automatically installs these tools during execution:
- Node.js and npm
- Salesforce CLI
- GitHub Copilot CLI
You can customize the workflow by:
- Modifying file patterns: Edit the
pathssection in the workflow file to include/exclude specific file types - Adjusting fix patterns: Modify the
ada-compliance-fix.shscript to add custom accessibility patterns - Changing commit messages: Update the commit message template in the workflow
-
Lightning Web Components (LWC)
- HTML templates (
.html) - JavaScript controllers (
.js) - CSS stylesheets (
.css)
- HTML templates (
-
Aura Components
- Component markup (
.cmp) - Controllers (
.js) - Helpers (
.js) - Stylesheets (
.css)
- Component markup (
-
Visualforce Components
- Component files (
.component) - Pages (
.page)
- Component files (
The automation follows WCAG 2.1 AA compliance standards and checks for:
- Keyboard Navigation: All interactive elements accessible via keyboard
- Screen Reader Support: Proper ARIA attributes and semantic markup
- Color Contrast: Minimum 4.5:1 ratio for normal text, 3:1 for large text
- Form Accessibility: Proper labels, error messages, and required field indicators
- Focus Management: Visible focus indicators and logical tab order
- Alternative Text: Descriptive alt text for images and icons
- Touch Targets: Minimum 44px size for interactive elements
- Motion Sensitivity: Reduced motion support for users with vestibular disorders
While the automation fixes many common issues, manual testing is still recommended:
- Keyboard Navigation: Tab through all interactive elements
- Screen Reader: Test with NVDA, JAWS, or VoiceOver
- Color Contrast: Use tools like WebAIM Contrast Checker
- Mobile Accessibility: Test touch targets and gestures
- Zoom Testing: Ensure functionality at 200% zoom
The workflow creates:
- PR Comments: Summary of fixes applied
- Artifacts: Detailed reports uploaded to the workflow run
- Logs: Complete execution logs for troubleshooting
- Check that the file paths match your component structure
- Ensure the workflow file is in
.github/workflows/ - Verify branch protection rules aren't blocking the automation
- Check the workflow logs for errors
- Ensure Copilot CLI is properly authenticated
- Verify file permissions for the script
- Review and adjust the patterns in the fix script
- Add file exclusions to the workflow if needed
- Customize the Copilot prompts for your specific use cases
To improve the ADA compliance automation:
- Fork the repository
- Make changes to the workflow or scripts
- Test with sample PR
- Submit a PR with your improvements