WIP: Initial attempt to set up an automated accessibility test #565
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Enable Automated Lighthouse Accessibility Testing
Summary:
This pull request introduces an automated workflow to perform accessibility testing using Lighthouse on every push and pull request to the main branch. The workflow is designed to ensure our platform meets the WCAG AA standards by maintaining an accessibility score of 90% or higher.
Details:
Workflow Trigger:
The workflow runs on every push and pull request targeting the main branch.
Job Configuration:
Environment Setup:
The workflow uses the ubuntu-latest runner.
A Postgres database service is set up using postgis/postgis:latest.
Environment variables are configured for the development environment.
Steps:
Checkout Code: The latest code is checked out from the repository.
Install Ruby and Gems: Ruby and necessary gems are installed.
Clean up PIDs: Any existing Puma server PIDs are removed to prevent conflicts.
Set up Database Schema: The database schema is loaded.
Run Rails Server: The Rails server is started on port 3000.
Set up Node.js: Node.js is set up with version 14.
Install Lighthouse: Lighthouse is installed globally.
Run Lighthouse: Lighthouse runs accessibility checks against the local server and generates a report.
Upload Lighthouse Report: The generated Lighthouse report is uploaded as an artifact.
Parse Lighthouse Report: The accessibility score is extracted from the report. If the score is below 90%, the build fails.
Benefits:
Automated Accessibility Checks: Ensures that our platform consistently meets accessibility standards without manual intervention.
Early Detection: Identifies accessibility issues early in the development process, reducing the cost and effort of fixes.
Continuous Improvement: Encourages continuous improvement in accessibility compliance, benefiting all users, including those with disabilities.
Instructions for Reviewers:
Verify that the workflow runs successfully on this pull request.
Check the generated Lighthouse report for accessibility compliance.
Ensure the workflow does not introduce any conflicts or performance issues.
Next Steps:
Monitor the results of the workflow over subsequent pushes and pull requests.
Address any accessibility issues identified by Lighthouse.
Consider expanding the workflow to include other categories (e.g., performance, best practices) in the future.
Thank you for reviewing this pull request. Your feedback is appreciated!