Merge pull request #790 from Jenks00/a11y/chart-text-alternatives-777 #401
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Accessibility Testing | |
| on: | |
| push: | |
| branches: [master, main, develop] | |
| pull_request: | |
| branches: [master, main, develop] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| a11y: | |
| name: Accessibility Audit | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - run: npm ci | |
| - run: npx playwright install --with-deps chromium | |
| - name: Build app | |
| run: npm run build | |
| - name: Run accessibility gate (axe-core WCAG 2.1 AA) | |
| run: npm run test:a11y | |
| env: | |
| PLAYWRIGHT_BASE_URL: http://localhost:4173 | |
| - name: Run E2E accessibility tests | |
| run: npm run test:e2e -- --project=chromium tests/e2e/accessibility.spec.ts tests/e2e/navigation.spec.js | |
| env: | |
| PLAYWRIGHT_BASE_URL: http://localhost:4173 | |
| - name: Upload Playwright report | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: playwright-a11y-report | |
| path: tests/e2e/report/ |