Git Product home page Git Product logo

continua11y's Introduction

continua11y

Accessibility Build Status Code Climate Test Coverage

A continuous integration service using pa11y, a web accessibility tool. It provides a script for generating accessibility statistics for all pages on a site, which is designed to run within a testing environment like Travis CI (though it can run anywhere). It then stores the results of scans in a Postgres database and produces a badge with the result that can be used as an image on any website.

Contributing

See CONTRIBUTING for additional information.

Branch flow

  • Main branch: release
  • Development branch: develop

Usage

Run continua11y.sh as part of your Travis CI suite of tests.

  1. Copy the script to your repo and add after_script: ./path/to/continua11y.sh to your .travis.yml file.

  2. Set a few environmental variables:

    • RUN_SCRIPT: The command for serving your site. Necessary if the server shuts down after the tests run in script. Make sure that the server detaches so that the script continues to run.
    • KILL_SCRIPT: The command to stop serving. This is optional, and more useful for local development.
    • USE_SITEMAP: If your site has a sitemap.xml file, set to true to use that instead of the spider.
    • PORT: The port on localhost where your served site is found.
    • STANDARD: The accessibility standard used for testing. Defaults to WCAG2AAA, but can also be Section508, WCAG2A, or WCAG2AA.
    • CONTINUA11Y: The location where continua11y is running. The main site is continua11y.18f.gov, but you can change this for testing purposes or whatever.

Installation

cp .env.sample .env
npm install
node app.js # or foreman start

You may run into trouble installing the gh-badges package. Check that project for more in-depth information.

Docker setup

Optionally, you can use Docker (and docker-compose) to run the server locally. Once you have Docker and docker-compose installed, run:

docker-compose up

If you're on a Mac, you can get the IP address of the local server by running docker-machine ip.

Then open http://$(docker-machine ip):3000 (or visit localhost:3000 if you're on Linux.).

Public domain

This project is in the worldwide public domain. As stated in CONTRIBUTING:

This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication.

All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.

continua11y's People

Contributors

adelevie avatar singingwolfboy avatar stvnrlly 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.