All Projects → pa11y → Pa11y Ci

pa11y / Pa11y Ci

Licence: lgpl-3.0
Pa11y CI is a CI-centric accessibility test runner, built using Pa11y

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Pa11y Ci

auto-vo
Screen reader automation tools by AccessLint, including VoiceOver.js and Auto-VO
Stars: ✭ 118 (-59.45%)
Mutual labels:  accessibility, a11y, automated-testing
Pa11y
Pa11y is your automated accessibility testing pal
Stars: ✭ 3,207 (+1002.06%)
Mutual labels:  automated-testing, accessibility, a11y
DomainAccessibilityAudit
Web application to create domain and subdomain accessibility audits, with violation statistics.
Stars: ✭ 41 (-85.91%)
Mutual labels:  accessibility, a11y
bookworm
The Universally Accessible document Reader
Stars: ✭ 50 (-82.82%)
Mutual labels:  accessibility, a11y
van11y-accessible-hide-show-aria
ES2015 accessible hide-show system (collapsible regions), using ARIA
Stars: ✭ 34 (-88.32%)
Mutual labels:  accessibility, a11y
accessibility-cloud
👩🏽‍🦯🦮👩🏻‍🦽👩🏿‍🦼 the platform to exchange physical accessibility data in a standardized, future-proof, easy-to-use way.
Stars: ✭ 37 (-87.29%)
Mutual labels:  accessibility, a11y
enabler
✋ Accessibility analyzer for your frontend.
Stars: ✭ 19 (-93.47%)
Mutual labels:  accessibility, a11y
Lighthouse Action
💡🏠 GitHub Action for running @GoogleChromeLabs Lighthouse webpage audits
Stars: ✭ 263 (-9.62%)
Mutual labels:  ci, accessibility
accessibility-testing-tools
A collection of useful tools for accessibility testing and debugging in the browser, online and desktop
Stars: ✭ 18 (-93.81%)
Mutual labels:  accessibility, a11y
chaarts
Charts with HTML & CSS
Stars: ✭ 79 (-72.85%)
Mutual labels:  accessibility, a11y
a11ymyths
a11ymyths.com
Stars: ✭ 26 (-91.07%)
Mutual labels:  accessibility, a11y
react-native-aria
A library of React Hooks for React-Native (Android/iOS/web) to provide accessible UI primitives for a design system.
Stars: ✭ 164 (-43.64%)
Mutual labels:  accessibility, a11y
Js Offcanvas
A lightweight, flexible jQuery off-canvas navigation plugin which lets you create fully accessible sidebar or top/bottom sliding (or push) panels with keyboard interactions and ARIA attributes.
Stars: ✭ 272 (-6.53%)
Mutual labels:  accessibility, a11y
AT-browser-tests
HTML tests for various uses, including HTML5accessibility.com and JAWS tests
Stars: ✭ 74 (-74.57%)
Mutual labels:  accessibility, a11y
Accessibility
A repo to organize the guidelines and best practices for accessibility at 18f.
Stars: ✭ 269 (-7.56%)
Mutual labels:  accessibility, a11y
agnosticui
AgnosticUI is a set of UI primitives that start their lives in clean HTML and CSS. These standards compliant components are then copied to our framework implementations in: React, Vue 3, Angular, and Svelte.
Stars: ✭ 326 (+12.03%)
Mutual labels:  accessibility, a11y
AccessSniff
Automated accessibility testing using HTML_Codesniffer (WCAG and Section508)
Stars: ✭ 84 (-71.13%)
Mutual labels:  accessibility, a11y
jquery-accessible-modal-window-aria
jQuery simple and accessible modal window, using ARIA
Stars: ✭ 61 (-79.04%)
Mutual labels:  accessibility, a11y
quiz-extensions
A self-service LTI for faculty to easily extend time for multiple users for all quizzes at once.
Stars: ✭ 15 (-94.85%)
Mutual labels:  accessibility, a11y
Parvus
An accessible, open-source image lightbox with no dependencies.
Stars: ✭ 248 (-14.78%)
Mutual labels:  accessibility, a11y

Pa11y CI

Pa11y CI is a CI-centric accessibility test runner, built using Pa11y.

CI runs accessibility tests against multiple URLs and reports on any issues. This is best used during automated testing of your application and can act as a gatekeeper to stop a11y issues from making it to live.

NPM version Node.js version support Build status Dependencies LGPL-3.0 licensed


Table Of Contents

Requirements

This command line tool requires Node.js 8+. You can install through npm:

npm install -g pa11y-ci

Usage

Pa11y CI can be used by running it as a command line tool, pa11y-ci:

Usage: pa11y-ci [options] [<paths>]

Options:

  -h, --help                       output usage information
  -V, --version                    output the version number
  -c, --config <path>              the path to a JSON or JavaScript config file
  -s, --sitemap <url>              the path to a sitemap
  -f, --sitemap-find <pattern>     a pattern to find in sitemaps. Use with --sitemap-replace
  -r, --sitemap-replace <string>   a replacement to apply in sitemaps. Use with --sitemap-find
  -x, --sitemap-exclude <pattern>  a pattern to find in sitemaps and exclude any url that matches
  -j, --json                       Output results as JSON
  -T, --threshold <number>         permit this number of errors, warnings, or notices, otherwise fail with exit code 2

Configuration

By default, Pa11y CI looks for a config file in the current working directory, named .pa11yci. This should be a JSON file.

You can use the --config command line argument to specify a different file, which can be either JSON or JavaScript. The config files should look like this:

{
    "urls": [
        "http://pa11y.org/",
        "http://pa11y.org/contributing"
    ]
}

Pa11y will be run against each of the URLs in the urls array and the paths specified as CLI arguments. Paths can be specified as relative, absolute and as glob patterns.

Default configuration

You can specify a default set of pa11y configurations that should be used for each test run. These should be added to a defaults object in your config. For example:

{
    "defaults": {
        "timeout": 1000,
        "viewport": {
            "width": 320,
            "height": 480
        }
    },
    "urls": [
        "http://pa11y.org/",
        "http://pa11y.org/contributing"
    ]
}

Pa11y CI has a few of its own configurations which you can set as well:

  • concurrency: The number of tests that should be run in parallel. Defaults to 2.
  • useIncognitoBrowserContext: Run test with an isolated incognito browser context, stops cookies being shared and modified between tests. Defaults to false.

URL configuration

Each URL in your config file can be an object and specify pa11y configurations which override the defaults too. You do this by using an object instead of a string, and providing the URL as a url property on that object. This can be useful if, for example, you know that a certain URL takes a while to load or you want to check what the page looked like when the tests were run:

{
    "defaults": {
        "timeout": 1000
    },
    "urls": [
        "http://pa11y.org/",
        {
            "url": "http://pa11y.org/contributing",
            "timeout": 50000,
            "screenCapture": "myDir/my-screen-capture.png"
        }
    ]
}

Sitemaps

If you don't wish to specify your URLs in a config file, you can use an XML sitemap that's published somewhere online. This is done with the --sitemap option:

pa11y-ci --sitemap http://pa11y.org/sitemap.xml

This takes the text content of each <loc> in the XML and runs Pa11y against that URL. This can also be combined with a config file, but URLs in the sitemap will override any found in your JSON config.

If you'd like to perform a find/replace operation on each URL in a sitemap, e.g. if your sitemap points to your production URLs rather than local ones, then you can use the following flags:

pa11y-ci --sitemap http://pa11y.org/sitemap.xml --sitemap-find pa11y.org --sitemap-replace localhost

The above would ensure that you run Pa11y CI against local URLs instead of the live site.

If there are items in the sitemap that you'd like to exclude from the testing (for example PDFs) you can do so using the --sitemap-exclude flag.

Tutorials and articles

Here are some useful articles written by Pa11y users and contributors:

Contributing

There are many ways to contribute to Pa11y CI, we cover these in the contributing guide for this repo.

If you're ready to contribute some code, clone this repo locally and commit your code on a new branch.

Please write unit tests for your code, and check that everything works by running the following before opening a PR:

make ci

You can also run verifications and tests individually:

make verify              # Verify all of the code (JSHint/JSCS)
make test                # Run all tests
make test-unit           # Run the unit tests
make test-unit-coverage  # Run the unit tests with coverage
make test-integration    # Run the integration tests

Support and Migration

Pa11y CI major versions are normally supported for 6 months after their last minor release. This means that patch-level changes will be added and bugs will be fixed. The table below outlines the end-of-support dates for major versions, and the last minor release for that version.

We also maintain a migration guide to help you migrate.

Major Version Last Minor Release Node.js Versions Support End Date
❤️ 2 N/A 8+ N/A
⌛️ 1 1.3 4+ 2018-04-18

If you're opening issues related to these, please mention the version that the issue relates to.

Licence

Licensed under the Lesser General Public License (LGPL-3.0).
Copyright © 2016–2017, Team Pa11y

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].