pa11y: possibilité d'activer/désactiver les notices/warnings
This commit is contained in:
parent
11f3ddc835
commit
83893e65d4
|
@ -10,10 +10,19 @@ cd reports
|
||||||
export PUPPETEER_EXECUTABLE_PATH=$(which chromium-browser)
|
export PUPPETEER_EXECUTABLE_PATH=$(which chromium-browser)
|
||||||
export PA11Y_REPORTER="${PA11Y_REPORTER:-html}"
|
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 \
|
pa11y \
|
||||||
--config ../patty.json \
|
--config ../patty.json \
|
||||||
--include-warnings \
|
${PA11Y_ARGS} \
|
||||||
--include-notices \
|
|
||||||
--reporter "${PA11Y_REPORTER}" \
|
--reporter "${PA11Y_REPORTER}" \
|
||||||
--standard "${PA11Y_STANDARD}" \
|
--standard "${PA11Y_STANDARD}" \
|
||||||
"$PA11Y_URL" || exit 0
|
"$PA11Y_URL" || exit 0
|
||||||
|
|
|
@ -3,6 +3,8 @@ def audit(String url, Map params = [:]) {
|
||||||
def username = params.username ? params.username : '';
|
def username = params.username ? params.username : '';
|
||||||
def password = params.password ? params.password : '';
|
def password = params.password ? params.password : '';
|
||||||
def standard = params.standard ? params.standard : 'WCAG2AA';
|
def standard = params.standard ? params.standard : 'WCAG2AA';
|
||||||
|
def includeWarnings = params.includeWarnings ? params.includeWarnings : false;
|
||||||
|
def includeNotices = params.includeNotices ? params.includeNotices : false;
|
||||||
|
|
||||||
def pa11yImage = buildDockerImage()
|
def pa11yImage = buildDockerImage()
|
||||||
|
|
||||||
|
@ -12,6 +14,8 @@ def audit(String url, Map params = [:]) {
|
||||||
-e PA11Y_USERNAME='${username}'
|
-e PA11Y_USERNAME='${username}'
|
||||||
-e PA11Y_PASSWORD='${password}'
|
-e PA11Y_PASSWORD='${password}'
|
||||||
-e PA11Y_STANDARD='${standard}'
|
-e PA11Y_STANDARD='${standard}'
|
||||||
|
-e PA11Y_INCLUDE_WARNINGS='${includeWarnings}'
|
||||||
|
-e PA11Y_INCLUDE_NOTICES='${includeNotices}'
|
||||||
"""
|
"""
|
||||||
|
|
||||||
pa11yImage.inside(dockerArgs) {
|
pa11yImage.inside(dockerArgs) {
|
||||||
|
|
Loading…
Reference in New Issue