67 lines
1.7 KiB
YAML
67 lines
1.7 KiB
YAML
name: Accessibility
|
|
|
|
# Runs the axe-core vitest suites (apps/web ui components, SkipToContent)
|
|
# and the WCAG-2.2-AA color-contrast verifier on every PR + push to main.
|
|
#
|
|
# Spec: docs/improvement-plan/10-compliance-polish/wcag-internal.md
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: a11y-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
axe:
|
|
name: axe-core + color-contrast
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 20
|
|
env:
|
|
DATABASE_URL: postgresql://toolctrl:toolctrl@localhost:5432/toolctrl?schema=public
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Enable Corepack
|
|
run: corepack enable
|
|
|
|
- name: Prepare pnpm 10.33.0
|
|
run: corepack prepare pnpm@10.33.0 --activate
|
|
|
|
- name: Configure pnpm store
|
|
run: pnpm config set store-dir .pnpm-store
|
|
|
|
- name: Cache pnpm store
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: .pnpm-store
|
|
key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pnpm-
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile --prefer-offline
|
|
|
|
- name: Run color-contrast verifier
|
|
run: pnpm run verify:color-contrast
|
|
|
|
- name: Verify accessibility coverage
|
|
run: pnpm run verify:a11y-coverage
|
|
|
|
- name: Run axe vitest suite (test:a11y)
|
|
run: pnpm run test:a11y
|
|
|
|
- name: Verify accessibility lint baseline
|
|
run: pnpm run verify:a11y-baseline
|
|
|
|
- name: Lint accessibility rules (eslint-plugin-jsx-a11y)
|
|
run: pnpm run lint
|