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}`), +};