From 6196216b37221b25d4676738e8bce3b83f76c9fa Mon Sep 17 00:00:00 2001 From: Joe Carstairs Date: Mon, 27 Nov 2023 14:05:06 +0000 Subject: [PATCH] Writes pa11y-ci configuration file --- .pa11yci.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .pa11yci.js diff --git a/.pa11yci.js b/.pa11yci.js new file mode 100644 index 0000000000..51d007655b --- /dev/null +++ b/.pa11yci.js @@ -0,0 +1,20 @@ +const relativeUrls = require('./pa11y-ci-urls'); + +const chromiumBin = process.env.CHROMIUM_BIN; +if (!chromiumBin) { + throw new Error('CHROME_BIN environment variable is not set'); +} + +const baseUrl = 'http://localhost:4000'; + +module.exports = { + defaults: { + chromeLaunchConfig: { + executablePath: chromiumBin, + }, + ignore: [ + 'WCAG2AA.Principle1.Guideline1_4.1_4_3.G18.Fail', // colour contrast, which is a known issue + ], + }, + urls: relativeUrls.map((url) => `${baseUrl}${url}`), +};