2020-08-10 15:03:40 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
envtpl -o patty.json /home/pa11y/patty.json.tmpl
|
|
|
|
|
|
|
|
mkdir -p reports
|
|
|
|
rm -f reports/*
|
|
|
|
|
|
|
|
cd reports
|
|
|
|
|
|
|
|
export PUPPETEER_EXECUTABLE_PATH=$(which chromium-browser)
|
|
|
|
export PA11Y_REPORTER="${PA11Y_REPORTER:-html}"
|
2022-11-18 15:18:23 +01:00
|
|
|
export PA11Y_STANDARD="${PA11Y_STANDARD:-WCAG2AA}"
|
2022-11-21 19:19:14 +01:00
|
|
|
export PA11Y_IGNORE="${PA11Y_IGNORE}"
|
2020-08-10 15:03:40 +02:00
|
|
|
|
2020-08-11 10:53:49 +02:00
|
|
|
PA11Y_ARGS=""
|
|
|
|
|
|
|
|
if [ "${PA11Y_INCLUDE_WARNINGS}" == 'true' ]; then
|
|
|
|
PA11Y_ARGS="${PA11Y_ARGS} --include-warnings"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "${PA11Y_INCLUDE_NOTICES}" == 'true' ]; then
|
|
|
|
PA11Y_ARGS="${PA11Y_ARGS} --include-notices"
|
|
|
|
fi
|
|
|
|
|
2020-08-10 15:03:40 +02:00
|
|
|
pa11y \
|
|
|
|
--config ../patty.json \
|
2020-08-11 10:53:49 +02:00
|
|
|
${PA11Y_ARGS} \
|
2020-08-10 15:03:40 +02:00
|
|
|
--reporter "${PA11Y_REPORTER}" \
|
2020-08-11 10:22:57 +02:00
|
|
|
--standard "${PA11Y_STANDARD}" \
|
2022-11-18 15:18:23 +01:00
|
|
|
--ignore "${PA11Y_IGNORE}" \
|
2020-08-10 15:15:32 +02:00
|
|
|
"$PA11Y_URL" || exit 0
|