cfpb / node-wcag

WCAG and Section 508 accessibility audits from the command line.
Creative Commons Zero v1.0 Universal
31 stars 8 forks source link

Abort on bad websites #15

Closed contolini closed 9 years ago

contolini commented 9 years ago

AChecker's API reports a status of PASS if the URL provided by the user isn't valid (example). This is bad.

This PR connects to AChecker while simultaneously attempting to reach the URL via http. It uses async.parallel to avoid a race condition. If the http request fails, it aborts and notifies the user.

Fixes #11.

zrrrzzt commented 9 years ago

As far as I can see this PR solves the problem with unreachable URLs :-)

I'll create a new issue regarding validation of the supplied URL

contolini commented 9 years ago

@zrrrzzt Good call, I didn't tackle that here.