From 50e35cdff7938b391e42036d36020909f2106b7a Mon Sep 17 00:00:00 2001 From: abhiram6121 <142340683+abhiram6121@users.noreply.github.com> Date: Thu, 17 Oct 2024 23:45:42 +0530 Subject: [PATCH 1/2] feat(CI): Add pa11y-ci accessibility check for frontend --- .github/workflows/pa11y-ci.yaml | 32 ++++++++++++++++++++++++++++++++ frontend/.pa11yci | 7 +++++++ 2 files changed, 39 insertions(+) create mode 100644 .github/workflows/pa11y-ci.yaml create mode 100644 frontend/.pa11yci diff --git a/.github/workflows/pa11y-ci.yaml b/.github/workflows/pa11y-ci.yaml new file mode 100644 index 000000000..f732bfb92 --- /dev/null +++ b/.github/workflows/pa11y-ci.yaml @@ -0,0 +1,32 @@ +name: pa11y-ci +on: + workflow_dispatch: + push: + branches: + - main + +jobs: + pa11y-ci: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + - name: Install dependencies + working-directory: frontend + run: | + npm ci + npm install -g https://github.com/aarongoldenthal/pa11y-ci + - name: Build + working-directory: frontend + run: npm run build + - name: Start Preview + working-directory: frontend + run: | + npm run preview & sleep 3 + - name: Run pa11y-ci + working-directory: frontend + run: pa11y-ci + continue-on-error: true diff --git a/frontend/.pa11yci b/frontend/.pa11yci new file mode 100644 index 000000000..e71f63815 --- /dev/null +++ b/frontend/.pa11yci @@ -0,0 +1,7 @@ +{ + "urls": [ + "http://localhost:4173", + "http://localhost:4173/about", + "http://localhost:4173/settings" + ] +} From a2de828d1c30d380005c1703a45c0de4b6303925 Mon Sep 17 00:00:00 2001 From: abhiram6121 <142340683+abhiram6121@users.noreply.github.com> Date: Tue, 22 Oct 2024 14:07:52 +0530 Subject: [PATCH 2/2] Remove about page from pa11yci config since it is deprecated. --- frontend/.pa11yci | 1 - 1 file changed, 1 deletion(-) diff --git a/frontend/.pa11yci b/frontend/.pa11yci index e71f63815..86bceedb7 100644 --- a/frontend/.pa11yci +++ b/frontend/.pa11yci @@ -1,7 +1,6 @@ { "urls": [ "http://localhost:4173", - "http://localhost:4173/about", "http://localhost:4173/settings" ] }