All Projects → yargalot → AccessSniff

yargalot / AccessSniff

Licence: other
Automated accessibility testing using HTML_Codesniffer (WCAG and Section508)

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to AccessSniff

ckeditor4-plugin-a11ychecker
Accessibility checker for CKEditor 4
Stars: ✭ 17 (-79.76%)
Mutual labels:  accessibility, a11y, wcag
Pa11y
Pa11y is your automated accessibility testing pal
Stars: ✭ 3,207 (+3717.86%)
Mutual labels:  accessibility, a11y, html-codesniffer
enabler
✋ Accessibility analyzer for your frontend.
Stars: ✭ 19 (-77.38%)
Mutual labels:  accessibility, a11y, wcag
a11y-guidelines
アメーバアクセシビリティガイドライン
Stars: ✭ 61 (-27.38%)
Mutual labels:  accessibility, a11y, wcag
accessibility-testing-tools
A collection of useful tools for accessibility testing and debugging in the browser, online and desktop
Stars: ✭ 18 (-78.57%)
Mutual labels:  accessibility, a11y, wcag
eufemia
DNB Design System
Stars: ✭ 38 (-54.76%)
Mutual labels:  accessibility, a11y, wcag
alfa
♿ Suite of open and standards-based tools for performing reliable accessibility conformance testing at scale
Stars: ✭ 75 (-10.71%)
Mutual labels:  accessibility, a11y, wcag
accessibility-ruleset-runner
eBay Accessibility Ruleset Runner automates 20% of WCAG 2.0 AA recommendations, saving time on manual testing.
Stars: ✭ 24 (-71.43%)
Mutual labels:  accessibility, a11y, wcag
chusho
A library of bare & accessible components and tools for Vue.js 3
Stars: ✭ 47 (-44.05%)
Mutual labels:  accessibility, a11y, wcag
a11y-checker
Identifies accessibility issues in HTML markup.
Stars: ✭ 103 (+22.62%)
Mutual labels:  accessibility, a11y, wcag
a11y-contracting
Building Accessibility Best Practices into Contracting
Stars: ✭ 43 (-48.81%)
Mutual labels:  accessibility, a11y, wcag
cluse
Sketch Plugin to check and adjust color contrast accessibility with live preview and sliders. Endorsed by Sketch.
Stars: ✭ 54 (-35.71%)
Mutual labels:  accessibility, a11y, wcag
AccessConfig
Un sélecteur de styles, léger et open source, pour permettre aux personnes en situation de handicap d’adapter votre site à certains de leurs besoins.
Stars: ✭ 20 (-76.19%)
Mutual labels:  a11y, wcag
sublime-wai-aria
WAI-ARIA Roles, States and Properties auto-completion for Sublime Text
Stars: ✭ 21 (-75%)
Mutual labels:  accessibility, a11y
a11yjson
A11yJSON: A standard to describe the accessibility of the physical world.
Stars: ✭ 58 (-30.95%)
Mutual labels:  accessibility, a11y
a11y-accordion-tabs
A script for an accessible accordion tabs component
Stars: ✭ 50 (-40.48%)
Mutual labels:  accessibility, a11y
jquery-accessible-carrousel-aria
jQuery Accessible Carrousel System, using ARIA
Stars: ✭ 40 (-52.38%)
Mutual labels:  accessibility, a11y
stucco
An experimental adaptive UI toolkit.
Stars: ✭ 31 (-63.1%)
Mutual labels:  accessibility, wcag
HTML-Lint
A code quality bookmarklet and command-line tool
Stars: ✭ 20 (-76.19%)
Mutual labels:  accessibility, a11y
jquery-accessible-modal-window-aria
jQuery simple and accessible modal window, using ARIA
Stars: ✭ 61 (-27.38%)
Mutual labels:  accessibility, a11y

AccessSniff

Build Status Build status codecov

A CLI, JsDom and PhantomJs library for HTML_CodeSniffer

Example Image

Getting Started

Install this plugin with npm install access-sniff --save

ES5

var AccessSniff = require('access-sniff');

AccessSniff
  .default(['**/*.html'], options)
  .then(function(report) {
    AccessSniff.report(report, reportOptions);
  });

ES6

import AccessSniff, { reports as AccessReports } from 'access-sniff';

AccessSniff(['**/*.html'], options)
  .then(report => AccessReports(report, reportOptions));

CLI

npm install access-sniff -g
sniff test/**/*.html -r json -l reports

AccessSniff can test both locally hosted files and websites.

sniff http://statamic.com/ -r json -l reports

Options

You can pass the following options

Accessibility Level

accessibilityLevel is a string

options: {
  accessibilityLevel: 'WCAG2A'
}

Levels are WCAG2A, WCAG2AA, WCAG2AAA, and Section508

Accessibilityrc

You can create an .accessibilityrc file in your project to set options:

{
  "ignore": [
    "WCAG2A.Principle2.Guideline2_4.2_4_2.H25.1.NoTitleEl",
    "WCAG2A.Principle3.Guideline3_1.3_1_1.H57.2"
  ]
}

Ignore

ignore is an array

You can ignore rules by placing them in an array outlined below.

options: {
  ignore: [
    'WCAG2A.Principle2.Guideline2_4.2_4_2.H25.1.NoTitleEl'
    'WCAG2A.Principle3.Guideline3_1.3_1_1.H57.2'
  ]
}

Rules will also match to remove and entire set.

WCAG2A.Principle2.Guideline2_4.2_4_2.H25.1 will ignore WCAG2A.Principle2.Guideline2_4.2_4_2.H25.1.NoTitleEl

Verbose output

verbose is a boolean

options: {
  verbose: false
}

Output messages to console, set to true by default

Force

force is a boolean, defaults to false

options: {
  force: true
}

Continue running in the event of failures. You can catch failures from the promise as below:

AccessSniff(['**/*.html'], options)
.then(report => AccessReports(report, reportOptions));
.catch(error => console.error(error))

Browser

browser is a boolean, defaults to false

options: {
  browser: false
}

AccessSniff uses jsDom as the default, setting this to true will use PhantomJs instead

maxBuffer

maxBuffer is a number, defaults to 500*1024

In certain situations you might have to increase the memory allocated to render a page.

options: {
  maxBuffer: 500*1024
}

Reports

You can pass the following options to the report generator

Notes

  • Reports are now generated from the returned json to the report module
  • Report location is required to write a report
  • Reports return the content from the report

Modular Reporting

You can use the inbuilt system or create your own

AccessSniff.report(report, reportOptions)

Report Type

reportType is a string

options: {
  reportType: 'json'
}

Text, CSV or JSON format output

  • txt will output text files
  • json will output .json files
  • csv will output csv

Report Location

reportLocation is a string

  options: {
    reportLocation: 'reports'
  }

Set the value to where you want reports created

Report Levels

reportLevels is an object

  options: {
    reportLevels: {
      notice: true,
      warning: true,
      error: true
    }
  }

Set a value to false to limit output

CLI

You can use the CLI component by installing it globally with npm install -g access-sniff

sniff test/**/*.html -r json -l reports
sniff test/**/*.html -r csv -l reports
sniff test/**/*.html -r txt -l reports

Options

Report Type

-r or -reportType

txt, csv, json.

Report Location

-r or -reportLocation

Force

-f or -force

Quiet

-q or -quiet

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].