a11ywatch / github-actions

A11yWatch Github Action
https://github.com/marketplace/actions/web-accessibility-evaluation
MIT License
22 stars 4 forks source link

URL_LIST feature suggestion #56

Open Ulthran opened 10 months ago

Ulthran commented 10 months ago

Hi again, sorry for the back to back issues. This one's more of a feature request. I'm trying to run this action on a dev site as part of a CI/CD pipeline. The dev site is an AWS API Gateway (running flask) and has a URL like https://abcde12345.execute-api.us-east-1.amazonaws.com/dev/. Whenever I try to run it with SITE_WIDE enabled, it runs until I cancel it (I've let it go for an hour plus vs when it's not enabled and it runs in ~5 mins with installation). And it always seems to hang on the a11ywatch crawl step.

So my question/feature request is this: would it be possible to add a URL_LIST kind of parameter that lets you run a11ywatch scan on each specified page instead of using a11ywatch crawl? Or, even better, am I just using the action wrong and there's a good way to handle this already? I tried adding a sitemap.xml using flask-sitemapper (which works) but the action still runs for way longer than it should to scan just the few pages of my site (again, never seen it finish). Is there a better way to strictly limit the crawl to pages off the root URL?

web-accessibility-eval:
    needs: dev-deploy
    runs-on: ubuntu-latest

    steps:
      - name: Web Accessibility Eval
        uses: a11ywatch/github-action@v2.1.9
        with:
          WEBSITE_URL: "https://abcde12345.execute-api.us-east-1.amazonaws.com/dev/"
          SITE_WIDE: false
          SUBDOMAINS: false
          TLD: false
          SITEMAP: true
          FAIL_ERRORS_COUNT: 15
          LIST: true
          FIX: true
          UPGRADE: false
          UPLOAD: true
        env:
          DEFAULT_RUNNERS: htmlcs,axe
          PAGEMIND_IGNORE_WARNINGS: true
          AI_DISABLED: false

Thanks in advance for any help :)

j-mendez commented 10 months ago

Hi @Ulthran no worries, it should only crawl the root url but, it looks like it is crawling all of amazon possibly. The SITE_WIDE env var should respect only the root url. Could you try to remove the double quotes around WEBSITE_URL and see if issues persist?

One way to debug the issue is to use the a11ywatch-cli locally to test if the page crawl finishes too.