1

I am using Accessibility Insights extension to find accessibility issues in web apps and sites. Now, I wanted to create an application through which I want to invoke this extension along with my URLs and want the issues found by the extension for my URLs as a response. I am wondering if this is possible with .NET or JavaScript applications or by any other way?

It would be great if anyone could help me out with this.

Sunny
  • 752
  • 1
  • 11
  • 24

2 Answers2

1

Sunny--

You might consider using the Accessibility Insights scanning CLI package, available here. This CLI shares a lot of code with in the browser extension, but without requiring you to drive any browser UI elements.

This CLI is still in fairly early development, so there's always a potential risk of command line changes in future versions, but we'll try to keep things as backward-compatible as we can.

Thanks for using Accessibility Insights!

--Dave Tryon (Accessibility Insights Team)

DaveTryon
  • 86
  • 2
  • thanks for the response. This package will definitely be helpful. – Sunny Oct 20 '20 at 06:50
  • Is there any way through which I can get the relation results i.e. no of failed instance, details of failed instances, etc or I have to fetch all these from the HTML report only? – Sunny Oct 22 '20 at 10:32
  • In its current form, the CLI is designed to generate only the full HTML report, but I could see an argument for having options for multiple output formats. You could fork the [sources](https://github.com/microsoft/accessibility-insights-service/tree/master/packages/cli) to modify the output, but then you'd lose out on future enhancements. You could submit a feature request to add additional output formats, but it may or may not happen. Perhaps the best option would be for you to create a PR that added a parameter and generated summary output in a JSON format. – DaveTryon Oct 23 '20 at 16:16
  • You can also look at the samples in the [axe-pipelines-samples repo](https://github.com/microsoft/axe-pipelines-samples). These samples call into the scanner directly, instead of using the CLI. You'd have to handle web crawling by yourself, but it might be simpler for you in the long run. – DaveTryon Oct 23 '20 at 18:54
1

You can run tool with --crawl parameter like in an example below. The tool will output the raw scan data in ./ai_scan_cli_output/key_value_stores/scan-results/*.axe.json file. The json file will contain scan result that is reflected in HTML report. The json file format is generated by the axe package where you can get more info about format details.

ai-scan --crawl --maxUrls 1 --url https://www.example.com/
Maxim
  • 11
  • 1