Skip to content
Draft

Pa11y #262

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/accessibility_checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Run accessibility checks on Quansight Consulting and Labs websites

on:
workflow_dispatch:
pull_request:
branches:
- main
push:
branches:
- main

jobs:
check-a11y:
runs-on: ubuntu-latest
strategy:
matrix:
website: [consulting, labs]
steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Install node
uses: actions/setup-node@v3
with:
node-version: "14.x"

- name: Install pa11y
run: npm ci

- name: Cache dependencies - Node
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-s

- name: Build website
run: npx nx build ${{ matrix.website }}

- name: Generate sitemap
run: npx nx sitemap ${{ matrix.website }}

- name: Serve website (with sitemap)
run: npx nx serve ${{ matrix.website }}

- name: Run pa11y against website
continue-on-error: true
run: npx pa11y-ci --sitemap=http://localhost:4200/sitemap.xml --sitemap-find=https --sitemap-replace=http
8 changes: 8 additions & 0 deletions .pa11yci
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"defaults": {
"runners": [
"axe",
"htmlcs"
]
}
}
Loading