pa11y: possibilité d'activer/désactiver les notices/warnings

This commit is contained in:
2020-08-11 10:53:49 +02:00
parent 11f3ddc835
commit 83893e65d4
2 changed files with 15 additions and 2 deletions

View File

@ -10,10 +10,19 @@ cd reports
export PUPPETEER_EXECUTABLE_PATH=$(which chromium-browser)
export PA11Y_REPORTER="${PA11Y_REPORTER:-html}"
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
pa11y \
--config ../patty.json \
--include-warnings \
--include-notices \
${PA11Y_ARGS} \
--reporter "${PA11Y_REPORTER}" \
--standard "${PA11Y_STANDARD}" \
"$PA11Y_URL" || exit 0