View on GitHub

Acop

flagging accessibility concerns

Download this project as a .zip file Download this project as a tar.gz file

acop - enforcing accessibility for web pages

Acop

Acop

Description

acop is a command line utility for verifying accessibility in web pages

With acop, you can specify a url you want to test for accessibility and acop would run through a checklist of accessibility concerns and return any issues found

Installation

gem install acop

Synopsis

Access the command line help

acop --help

Specify the url you want accessibility tested

acop -u http://www.google.com

Specify the urls to be tested in a file (new line separated)

acop -f ./list_of_urls.txt

Scaffold rspec tests for a particular url or list of urls in a file. The gem will create a spec directory(if none exists) from where it is run. In addition it will create a spec file with a describe block for a particular url or list of urls. If the spec file being used already exists, the gem will append to the file.

acop -u www.google.com -g rspec
acop -f list_of_urls -g rspec

Checkpoints

Standard Web Programming

<!DOCTYPE Resource SYSTEM 'foo.dtd'>

Appropriate Markup

Title

<title></title>

<frameset><frame title=""...

<iframe title=""...

Headings

<body><p><h1>Heading 1</h1><h2>Heading 2</h2><p><h3>Heading 3</h3></p></body>

HTML lang

<html lang='en'></html>

Hyperlinks

<body><a href="www.google.com">Go to Google</a></body>

Images

<input type='image'...

<img...

<a><img...

Area

<area shape='rect' coords='0,0,82,126' href='sun.htm' alt='Sun'>

Flashing content

Forms

<form><textarea id='area' rows='3' cols='3'></textarea><label for='area'/></form>

<form><input id='in' type='text' value="input_value"/></form>

<label for="label1">Label 1</label><label for="label2">Label 2</label>

<legend>Legend 1</legend>

<button type="button">Button 1</button>

Tables

<table summary="summary"><th>Table Heading</th><tr><td>Data 1</td></tr></table>

Tests

Running the rspec tests

cd spec; rspec acop_spec.rb

Additional Resources

While this gem does attempt to flag as many accessibility concerns as possible, there are numerous others that cannot be automated or are difficult to automate. Below are excellent resources that I would encourage anybody using this gem to also go through

Bugs

Report bugs and requests at the Github page.

Copyright

Copyright 2013 by Avinash Padmanabhan under the MIT license (see the LICENSE file).