From 921d32d70b3d5119acd7a9616eb7faa53f482dfc Mon Sep 17 00:00:00 2001 From: Ashley Harrison Date: Thu, 28 Jul 2022 17:49:41 +0100 Subject: [PATCH] Chore: use new `pa11y-ci` version (#52953) * use new pa11y-ci version, update some thresholds and set standard to WCAG2AA * remove unneeded comment * PRs won't have unified alerting enabled... --- .drone.yml | 6 +++--- .pa11yci-pr.conf.js | 5 +++-- .pa11yci.conf.js | 1 + scripts/drone/steps/lib.star | 2 +- scripts/generate-a11y-report.sh | 2 +- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.drone.yml b/.drone.yml index 74ae5e4371b..cc30814983c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -450,7 +450,7 @@ steps: HOST: grafana-server PORT: 3001 failure: always - image: grafana/docker-puppeteer:1.0.0 + image: grafana/docker-puppeteer:1.1.0 name: test-a11y-frontend - commands: - ./bin/grabpl build-docker --edition oss -archs amd64 @@ -1207,7 +1207,7 @@ steps: HOST: grafana-server PORT: 3001 failure: ignore - image: grafana/docker-puppeteer:1.0.0 + image: grafana/docker-puppeteer:1.1.0 name: test-a11y-frontend - commands: - ./bin/grabpl store-storybook --deployment canary --src-bucket grafana-storybook @@ -4986,6 +4986,6 @@ kind: secret name: gcp_upload_artifacts_key --- kind: signature -hmac: 63ee096e5fd4d4147f43465937c4976e0d64a1dffa74206282cd9c8edf6494c0 +hmac: d97f2ec8017ba6e3f16913e08ee1d53c4e653f87b6113fd3763e1ad557306810 ... diff --git a/.pa11yci-pr.conf.js b/.pa11yci-pr.conf.js index 36990b28bde..cac7073e24e 100644 --- a/.pa11yci-pr.conf.js +++ b/.pa11yci-pr.conf.js @@ -3,6 +3,7 @@ var config = { concurrency: 1, runners: ['axe'], useIncognitoBrowserContext: false, + standard: 'WCAG2AA', chromeLaunchConfig: { args: ['--no-sandbox'], }, @@ -60,7 +61,7 @@ var config = { rootElement: '.main-view', // the unified alerting promotion alert's content contrast is too low // see https://github.com/grafana/grafana/pull/41829 - threshold: 5, + threshold: 4, }, { url: '${HOST}/datasources', @@ -96,7 +97,7 @@ var config = { url: '${HOST}/org/apikeys', wait: 500, rootElement: '.main-view', - threshold: 4, + threshold: 3, }, { url: '${HOST}/dashboards', diff --git a/.pa11yci.conf.js b/.pa11yci.conf.js index b2fbf4274f7..17fe2be6af9 100644 --- a/.pa11yci.conf.js +++ b/.pa11yci.conf.js @@ -3,6 +3,7 @@ var config = { concurrency: 1, runners: ['axe'], useIncognitoBrowserContext: false, + standard: 'WCAG2AA', chromeLaunchConfig: { args: ['--no-sandbox'], }, diff --git a/scripts/drone/steps/lib.star b/scripts/drone/steps/lib.star index 6cf7c94716b..35ddb68f3e7 100644 --- a/scripts/drone/steps/lib.star +++ b/scripts/drone/steps/lib.star @@ -598,7 +598,7 @@ def test_a11y_frontend_step(ver_mode, edition, port=3001): return { 'name': 'test-a11y-frontend' + enterprise2_suffix(edition), - 'image': 'grafana/docker-puppeteer:1.0.0', + 'image': 'grafana/docker-puppeteer:1.1.0', 'depends_on': [ 'grafana-server' + enterprise2_suffix(edition), ], diff --git a/scripts/generate-a11y-report.sh b/scripts/generate-a11y-report.sh index d499af62b94..215f46605a4 100755 --- a/scripts/generate-a11y-report.sh +++ b/scripts/generate-a11y-report.sh @@ -27,7 +27,7 @@ else fi # Run accessibility command -yarn dlx --quiet pa11y-ci@pa11y/pa11y-ci#6b2d4f54efe445ad551472acc1877fe7542ac085 --config .pa11yci.conf.js --json > pa11y-ci-results.json +yarn dlx --quiet pa11y-ci@3.0.1 --config .pa11yci.conf.js --json > pa11y-ci-results.json # Generate HTML report yarn dlx pa11y-ci-reporter-html@3.0.1 pa11y-ci-reporter-html