Git Product home page Git Product logo

a11y's Introduction

A11y Automation Test Suite

An automated implementation of html5accessibility.com for Microsoft Edge.

Running

If you have Visual Studio, simply open A11y.sln and run.

Otherwise you can build and run in one step by calling run.ps1 within PowerShell.

Building and running manually

It's also possible to run manually without Visual Studio or PowerShell.

First navigate to the project's root directory and install nuget: powershell "(new-object net.webclient).DownloadFile('https://nuget.org/nuget.exe', 'nuget.exe')"

Then restore the packages: nuget.exe restore A11y.sln

Finally find MSBuild.exe, which comes pre-installed with the .NET framework. It will be in the C:\Windows\Microsoft.NET\Framework folder. For example: C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe. Make sure to use the version installed on your computer.

Use MSBuild to compile the solution: C:\Windows\Microsoft.NET\Framework\<VERSION ON YOUR PC>\MSBuild.exe A11y.sln

Then just run the compiled program: bin\Debug\Microsoft.Edge.A11y.exe

Scores and reporting

For a full explanation of how scores are calculated, see html5accessibility.com.

After the tests have run, the results are printed to the console and saved in the root directory of the project with the name "scores.csv".

Testing your site

It's possible to use A11y to automate testing of your site as well. A sample project is included on the site_testing branch.

Test files

The sample test page is included in this repo on the site_testing branch. It's possible (and better) to have your sites in another location. Just change the constructor call to to the TestStrategy class passing in the base URL where your test files are located.

Pass and failure conditions

The TestData.cs file contains the logic of the tests and an explanation of the built-in tests. To add your own tests, add a TestData object for each test you want to run.

By default, elements are found by their control type, but you can pass in a custom method of searching by adding a searchStrategy parameter.

In addition to the default tests, you can use the additionalRequirement paramter to specify any other requirement that you want to verify. If you find yourself using the same additionalRequirement for many of your tests, you may want to add another parameter to the TestData constructor to simplify testing that requirement.

Contributing

We want your feedback and your help! If you have any suggestions, file an issue and we can figure out how to get your needs met.

If you'd like to submit code changes, the best thing to do is to file an issue first so we can talk about whether the change would fit with the direction and purpose of the project. Even if your changes don't fit with the general purpose of A11y, we'd love to see you fork the project to do new things with it.

Legal

You will need to complete a Contributor License Agreement (CLA) before your pull request can be accepted. This agreement testifies that you are granting us permission to use the source code you are submitting, and that this work is being submitted under appropriate license that we can use it. The process is very simple as it just hooks into your Github account. Once we have received the signed CLA, we'll review the request. You will only need to do this once.

a11y's People

Contributors

dhbrett avatar gregwhitworth avatar meksh avatar mustjab avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.