• This repository has been archived on 18/Dec/2019
  • Stars
    star
    620
  • Rank 72,387 (Top 2 %)
  • Language
    JavaScript
  • Created almost 9 years ago
  • Updated almost 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The A11y Machine is an automated accessibility testing tool which crawls and tests pages of any web application to produce detailed reports.

Liip
presents
The Accessibility Testing Machine


The A11y Machine

Version Downloads License

Note: TheA11yMachine is no longer maintained.

The A11y Machine (or a11ym for short, spelled β€œalym”) is an automated accessibility testing tool which crawls and tests pages of any Web application to produce detailed reports. It validates pages against the following specifications/laws:

Table of contents

Why?

If privacy matters for you, you're likely to install The A11y Machine over any SaaS services: It runs locally so you don't need to send your code somewhere, you can test all parts of your application including the ones which require an authentification (like a checkout, a back-office etc.)…

Here are some pros and cons compared to SaaS solutions:

Properties The A11y Machine SaaS services
Can run locally yes no
Can test each patch yes no (except if deployed)
Reduce the test loop yes no (the loop is longer)
Can test private code yes no (you must send your code)
Can test auth-required parts yes no
Can crawl all your pages yes yes (but it can be pricey)

Accessibility is not only a concern for disabled people. Bots can be considered as such, like DuckDuckGo, Google or Bing. By respecting these standards, you're likely to have a better ranking. Also it helps to clean your code. Accessibility issues are often left unaddressed for budget reasons. In fact most of the cost is spent looking for errors on your website. The A11y Machine greatly help with this task, you can thus focus on fixing your code and reap the benefits.

Installation

NPM is required. Then, execute the following lines:

$ npm install -g the-a11y-machine

If you would like to validate your pages against the HTML5 recommendation, then you need to install Java.

As an alternative you can run a Docker image instead, which will ensure the image is available locally:

$ docker build -t liip/the-a11y-machine .
$ docker run liip/the-a11y-machine --help

To get access to a report you will need to:

  • Mount a path into the container,
  • Specifify that internal path in your a11ym CLI options.

For example:

$ docker run -v $PWD:/var/output liip/the-a11y-machine -o /var/output http://example.org

Usage

As a prelude, see the help:

  Usage: a11ym [options] url …

  Options:

    -h, --help                                 output usage information
    -b, --bootstrap <path>                     Bootstrap file, i.e. the configuration file. All CLI options will overwrite options defined in the configuration file.
    -e, --error-level <error_level>            Minimum error level: In ascending order, `notice` (default), `warning`, and `error` (e.g. `warning` includes all warnings and errors).
    -c, --filter-by-codes <codes>              Filter results by comma-separated WCAG codes (e.g. `H25,H91,G18`).
    -C, --exclude-by-codes <codes>             Exclude results by comma-separated WCAG codes (e.g. `H25,H91,G18`).
    -d, --maximum-depth <depth>                Explore up to a maximum depth (hops).
    -m, --maximum-urls <maximum_urls>          Maximum number of URLs to compute.
    -o, --output-directory <output_directory>  Output directory.
    -r, --report <report>                      Report format: `cli`, `csv`, `html` (default), `json` or `markdown`.
    -s, --standards <standards>                Standard to use: `WCAG2A`, `WCAG2AA` (default), ` WCAG2AAA`, `Section508`, `HTML` or your own (see `--sniffers`). `HTML` can be combined with any other by a comma.
    -S, --sniffers <sniffers>                  Path to the sniffers file, e.g. `resource/sniffers.js` (default).
    -u, --filter-by-urls <urls>                Filter URL to test by using a regular expression without delimiters (e.g. 'news|contact').
    -U, --exclude-by-urls <urls>               Exclude URL to test by using a regular expression without delimiters (e.g. 'news|contact').
    -w, --workers <workers>                    Number of workers, i.e. number of URLs computed in parallel.
    --http-auth-user <http_auth_user>          Username to authenticate all HTTP requests.
    --http-auth-password <http_auth_password>  Password to authenticate all HTTP requests.
    --http-tls-disable                         Disable TLS/SSL when crawling or downloading pages.
    -V, --no-verbose                           Make the program silent.
    --ignore-robots-txt                        Ignore robots.txt file.

Thus, the simplest use is to run a11ym with a URL:

$ ./a11ym http://example.org/

All URLs accessible from http://example.org/ will be tested against the WCAG2AA standard. See the --maximum-urls options to reduce the number of URLs to test.

Then open a11ym_output/index.html and browser the result!

List of URLs instead of crawling

You can compute several URLs by adding them to the command-line, like this:

$ ./a11ym http://example.org/A http://example.org/B http://example.org/C

Alternatively, this is possible to read URLs from STDIN, as follows:

$ cat URLs.lists | ./a11ym -

Note the -: It means β€œRead URLs from STDIN please”.

When reading several URLs, the --maximum-depth option will be forced to 1.

Possible output

The index of the reports:

Index of the report

Report of a specific URL:

Report of a specific URL

The dashboard of all reports:

Dashboard of all reports

Selecting standards

As mentionned, the following standards are supported:

  • W3C WCAG,
  • U.S. SectionΒ 508 legislation,
  • W3C HTML5 recommendation.

You cannot combine standards between each other, except HTML5 that can be combined with any other. So for instance, to run WCAG2AAA:

$ ./a11ym --standards WCAG2AAA http://example.org/

To run WCAG2AA along with HTML:

$ ./a11ym --standards WCAG2AA,HTML http://example.org/

How does it work?

The pipe looks like this:

  1. The node-simplecrawler tool is used to crawl a Web application based on the given URLs, with our own specific exploration algorithm to provide better results quickly, in addition to support parallelism,
  2. For each URL found, 2 kind of tests are applied:
    1. Accessibility: PhantomJS runs and HTML_CodeSniffer is injected in order to check the page conformance; This step is semi-automated by the help of pa11y, which is a very thin layer of code wrapping PhantomJS and HTML_CodeSniffer,
    2. HTML: The Nu Html Checker (v.Nu) is run on the same URL.
  3. Finally, results from different tools are normalized, and enhanced and easy to use reports are produced.

PhantomJS and HTML_CodeSniffer are widely-used, tested and precise tools. pa11y simplifies the use of these two latters. The Nu Html Checker is the tool used by the W3C to validate documents online. However, in this case, we do all validations offline! Nothing is sent over the network. Again, privacy.

Write your custom rules

HTML_CodeSniffer is build in a way that allows you to extend existing rules or write your own. A rule is represented as a sniffer (this is another terminology). The resource/sniffers/ directory contains an example of a custom sniffer.

The A11y Machine comes with a default file containing all the sniffers: resource/sniffers.js. You can provide your own by using the --sniffers option. To build your own sniffers, simply copy the resource/sniffers/ somewhere as a basis, complete it, then compile it with the a11ym-sniffers utility:

$ ./a11ym-sniffers --directory my/sniffers/ --output-directory my_sniffers.js

Then, to effectively use it:

$ ./a11ym --sniffers my_sniffers.js --standard MyStandard http://example.org/

Watch the dashboard

Run the a11ym-dashboard command to serve the dashboard. The dashboard is an overview of several reports generated by the a11ym command. The command can serves the dashboard over HTTP, or over static files. In addition to requiring a root directory, it requires: In the first case, an address, and a port, in the second, nothing more than just a flag. For instance, if the reports are generated with the following command:

$ ./a11ym --output-directory my_reports/`date +%s`/ http://example.org/A http://example.org/B

Then, the root directory is my_reports/ and thus the dashboard will be started over HTTP with the following command:

$ ./a11ym-dashboard --root my_reports

Browse 127.0.0.1:8080 (by default) to see the dashboard!

Or to generate static files:

$ ./a11ym-dashboard --root my_reports --static-output

Open my_reports/index.html, and do the same!

Bonus: Use the --open option to automatically open the dashboard in your favorite browser.

Roadmap and board

The roadmap is public:

The board is publicly available at the following URL: https://waffle.io/liip/TheA11yMachine.

Authors and license

Original author is Ivan Enderlin, accompagnied by Gilles Crettenand and David Jeanmonod. This software is backed by Liip.

BSD-3-Clause:

Copyright (c), Ivan Enderlin and Liip All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

More Repositories

1

LiipImagineBundle

Symfony Bundle to assist in image manipulation using the imagine library
PHP
1,661
star
2

LiipFunctionalTestBundle

Some helper classes for writing functional tests in Symfony
PHP
639
star
3

LiipMonitorBundle

Integrates the LiipMonitor library into Symfony
PHP
469
star
4

RMT

RMT is a handy tool to help releasing new version of your software
PHP
451
star
5

php-osx

DEPRECATED: See https://php-osx.liip.ch/ for details. The uploader and website for the PHP 5 package for OS X 10.6 built with https://github.com/liip/build-entropy-php
PHP
329
star
6

LiipThemeBundle

Provides theming support for Symfony bundles
PHP
291
star
7

bootstrap-blocks-wordpress-plugin

Bootstrap Gutenberg Blocks for WordPress
PHP
279
star
8

sheriff

Conditional marshalling for Go
Go
244
star
9

LiipHelloBundle

[DEPRECATED] Alternative Hello World Bundle for Symfony2 using several FriendsOfSymfony Bundles
PHP
201
star
10

LiipTestFixturesBundle

This bundles enables efficient loading of Doctrine fixtures in functional test-cases for Symfony applications
PHP
165
star
11

serializer

A PHP serializer that generates PHP code for maximum performance
PHP
128
star
12

LiipCacheControlBundle

DEPRECATED! This bundle is superseded by FOSHttpCacheBundle. A migration guide is in the README of LiipCacheControlBundle
PHP
108
star
13

kanbasu

A lightweight CSS framework written in Sass.
SCSS
92
star
14

LiipDoctrineCacheBundle

[DEPRECATED] use https://github.com/doctrine/DoctrineCacheBundle
PHP
71
star
15

LiipMagentoBundle

[DEPRECATED] Proof of concept for integrating Magento into Symfony2 applications
PHP
67
star
16

LiipMonitor

Deprecated: Generic PHP library to run application health checks
PHP
61
star
17

Radios

An mp3 streaming Application for the iPhone and the iPad
Objective-C
59
star
18

drifter

Drifter is a framework to help provision developer boxes using Ansible and Vagrant
HTML
57
star
19

chusho

A library of bare & accessible UI components and tools for Vue.js 3
TypeScript
55
star
20

SEO-keywords-generator

Keyword generator providing multiple commands in order to manage keyphrases for SEO monitoring tools such as AWRCloud
Python
52
star
21

LiipUrlAutoConverterBundle

[DEPRECATED] This bundle will add a Twig Extension for templates with a new filter for automatically converting urls and emails in a string to html links
PHP
50
star
22

extend-block-example-wp-plugin

Example how to extend an existing Gutenberg block in WordPress
JavaScript
49
star
23

packaging

deb and rpm packaging solution for php projects
PHP
49
star
24

styleguide-starterkit

A starterkit to create styleguides with Fractal and Webpack.
JavaScript
37
star
25

LiipSearchBundle

[DEPRECATED] Google XML API for searching is discontinued
PHP
35
star
26

LiipProcessManager

Provides a simple locking mechanism based on UNIX process id's written to a "PID file".
PHP
33
star
27

LiipVieBundle

[DEPRECATED] in favor of SymfonyCmfCreateBundle
JavaScript
32
star
28

viewmodel-savedstate-helpers

Easily save your Android ViewModel state with Kotlin
Kotlin
32
star
29

fanci

Fanci is a lightweight node module to extract, rename and transform JSON based on a template
JavaScript
30
star
30

LiipContainerWrapperBundle

[DEPRECATED] Don't screw DI by just injecting everything.
PHP
29
star
31

LiipCodeBundle

[DEPRECATED] A set of Symfony2 console commands to help developers deal with the various ways of identifying classes, templates, bundles, services, etc. Provides console commands to find their file path or class, as well as editor shortcuts.
PHP
26
star
32

LiipTranslationBundle

Tools for translation management
PHP
25
star
33

guess-the-liiper-ios

Guess the Liiper iOS version made with React Native
JavaScript
25
star
34

dockerbox

A small vagrant based docker box for using docker on OS X and Windows (based on https://github.com/phusion/open-vagrant-boxes)
Shell
25
star
35

packager

Lightweight package installer written in python
Python
22
star
36

LiipXsltBundle

[DEPRECATED] Renderer for XSLT templates in Symfony2 (not actively maintained)
PHP
20
star
37

LiipHyphenatorBundle

[Deprecated] Adds support to Symfony for hyphenating long words using the Org_Heigl_Hyphenator library.
PHP
20
star
38

SweetPreferences

Add syntactic sugar to your Android SharedPreferences
Kotlin
19
star
39

wrench

wrench: a CLI tool for Passbolt
Python
19
star
40

barcode.js

POC for a JavaScript barcode reader, blog post to follow
JavaScript
19
star
41

django-ansible

Deploy Django projects generated by liip/django-template with Ansible
Python
18
star
42

animate-blocks-wordpress-plugin

Animate Gutenberg blocks plugin for WordPress
JavaScript
18
star
43

presence

Presence shows you the availabilities of your set up team by analyzing their Google Calendar
PHP
18
star
44

django-template

Project template for Django projects
Python
17
star
45

metadata-parser

A PHP metadata parser for domain models
PHP
16
star
46

commit-hook-email

GitLab and Github Commit Email Hook
PHP
16
star
47

DataAggregator

[DEPRECATED] The data aggregator cumulates/filters information provided by one or more loader and routes them to one or more persistence layers.
PHP
16
star
48

magento-xhprof

[In Development] Profile Magento with XHProf
PHP
15
star
49

SwissGovernmentChatbots

15
star
50

bund-drupal-starterkit

PHP
14
star
51

styleguide

Liip Web Styleguide
SCSS
14
star
52

roger-q

Tool to work with RabbitMQ queues, including commands to dump, deduplicate and publish messages
PHP
14
star
53

liip10yearsgame

Jump and run through Liip's 10 year history
JavaScript
13
star
54

ckanext-ddi

CKAN extension for DDI, developed for the World Bank
Python
12
star
55

LiipSoapRecorderBundle

[DEPRECATED] Recorder/Player for SOAP communications
PHP
12
star
56

pontsun

The Liip docker local development orchestrator
12
star
57

wp-tyk-dev-portal

A WordPress plugin that adds a developer portal for a Tyk API Gateway
PHP
12
star
58

LiipMultiplexBundle

[DEPRECATED] Symfony2 controller that allows calling multiple URL's in one request as well as JSON-ifying any controller
PHP
12
star
59

LiipRokkaImagineBundle

integration between LiipImagineBundle and rokka.io
PHP
11
star
60

LiipKit

LiipKit regroups usefull classes/extensions used in many applications
Swift
11
star
61

LiipDrupalConnectorModule

An abstraction layer between the procedural world of Drupal and OOP.
PHP
11
star
62

serializer-jms-adapter

An adapter to make liip/serializer a drop-in replacement for jms/serializer
PHP
10
star
63

LiipFormTranslationChoiceBundle

[DEPRECATED] A Symfony2 bundle that provides a form widget and a validator that work with translation domains
PHP
10
star
64

packaging_demo

A demo project for the packaging solution at http://github.com/liip/packaging
PHP
9
star
65

LiipOneallBundle

[DEPRECATED] Symfony2 Bundle to integrate oneall.com
PHP
9
star
66

oc-blocks-theme

OctoberCMS theme that demonstrates the use of repeater groups to assemble static pages with customizable building blocks.
HTML
9
star
67

taxi-zebra

Zebra backend for Taxi
Python
8
star
68

niweaapp

The Tages-Anzeiger iPas App done in Niwea aka HTML5/CSS/JS
JavaScript
8
star
69

directus-utilities

Utility library for directus
TypeScript
8
star
70

frctl-twig

frctl-twig is an PHP Twig adapter for Fractal consisting of an NPM and a Composer package.
PHP
8
star
71

LiipFoxycartBundle

[DEPRECATED] Symfony Foxycart integration Bundle
PHP
8
star
72

discourse-multilingual-support

Provide some tools to have a better multilingual support on Discourse
Ruby
8
star
73

wrapper-block-example-wp-plugin

This is a WordPress plugin which shows how to create a wrapper block for Gutenberg.
JavaScript
7
star
74

e2e-tests-example-wp-plugin

Example how to write E2E tests for a Gutenberg block in WordPress
JavaScript
7
star
75

bower-lockfile-resolver

adds a missing feature of bower: a lockfile with all pacakages versions pinned
JavaScript
6
star
76

bund_ds

Vue
6
star
77

magerant

Magento Vagrant Setup (powered by Ansible)
Shell
6
star
78

jelapi

A Jelastic API Python library
Python
6
star
79

requests_gpgauthlib

A GPGAuth Client in Python
Python
5
star
80

ckan-vagrant

Vagrant based CKAN development environment
Ruby
5
star
81

LiipDrupalCrudAdminModule

The idea behind this module is to provide a most forward standard implementation to handle CRUD operations.
PHP
5
star
82

storybook-starterkit

A starterkit to create styleguides with Storybook and Twig.
JavaScript
5
star
83

directus-extension-gzip-hook

Directus extension gzip hook
TypeScript
4
star
84

liip-cookbooks

4
star
85

OpenLayersOfflineDemo

Demonstrate the offline storage with OpenLayers
JavaScript
4
star
86

fabliip

Set of Fabric functions to help deploying websites.
Python
4
star
87

Okapi

Okapi is a small framework for building web applications. It's built on PHP and XSLT and is fantastic for integration with REST web services.
PHP
4
star
88

html2kirby

Convert HTML markup to Kirby Markup
Python
4
star
89

liip-magento-shared

Liip Magento Shared
PHP
4
star
90

Backbone.localStorageSync

A caching layer between the client and server
JavaScript
4
star
91

Sodium.Xamarin

Xamarin compatible wrapper for libsodium
C#
3
star
92

magento-order-email-jsonld

PHP
3
star
93

magento-config-search

PHP
3
star
94

LiipDrupalRegistryModule

This module provides an API to store key/value pairs of information.
PHP
3
star
95

LiipTeraWurflBundle

[DEPRECATED] Symfony2 Bundle for the wurfl user agent. Not working! For reasons why check the url below ..
PHP
3
star
96

kanbasu-vue

Kanbasu components as Vue components
JavaScript
3
star
97

bund_drupal_starterkit_theme

CSS
3
star
98

smoke-detector

🚭 Allow us to be notified when there is smoke in the office.
Python
3
star
99

ushahidi-plugins-mobile

Mobile Accessible Version of Ushahidi
PHP
3
star
100

image-selector-example-wp-plugin

Example how to create an image selector for a Gutenberg block in WordPress
JavaScript
3
star