diff --git a/.github/workflows/documentation_accessibility_checks.yml b/.github/workflows/documentation_accessibility_checks.yml index 16bdd32cc59..731b150d9be 100644 --- a/.github/workflows/documentation_accessibility_checks.yml +++ b/.github/workflows/documentation_accessibility_checks.yml @@ -30,6 +30,8 @@ jobs: node-version-file: 'VAMobile/.nvmrc' cache: yarn cache-dependency-path: VAMobile/yarn.lock + - name: Install ChromeDriver + run: npm install -g chromedriver@126.0.0 - name: Test build working-directory: VAMobile run: | @@ -55,14 +57,14 @@ jobs: # Extract URLs from sitemap and iterate for url in $(grep -o '[^<]*' "$sitemap_path" | sed 's///'); do - if axe --chrome-options="no-sandbox,disable-setuid-sandbox,disable-dev-shm-usage,window-size=1920,1080,ignore-certificate-errors,ignore-ssl-errors,disable-gpu" --timeout=300000 "$url" --exit; then + if axe "$url" --chromedriver-path $(npm root -g)/chromedriver/bin/chromedriver --exit; then echo "No accessibility issues found in $url" else echo "Accessibility issues found in $url" echo "$url" >> accessibility_issues.txt # Extract number of issues from axe output - issues=$(axe --chrome-options="no-sandbox,disable-setuid-sandbox,disable-dev-shm-usage,window-size=1920,1080,ignore-certificate-errors,ignore-ssl-errors,disable-gpu" "$url" | grep -oP '\d+ Accessibility issues detected' | grep -oP '\d+') + issues=$(axe --chrome-options="no-sandbox,disable-setuid-sandbox,disable-dev-shm-usage" "$url" | grep -oP '\d+ Accessibility issues detected' | grep -oP '\d+') if [ -n "$issues" ]; then num_issues=$((num_issues + issues)) fi @@ -84,6 +86,7 @@ jobs: start_slack_thread: name: Start Slack thread + if: ${{ failure() }} needs: axe-scan uses: ./.github/workflows/start_slack_thread.yml secrets: inherit