Socket
Socket
Sign inDemoInstall

access-sniff

Package Overview
Dependencies
6
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    access-sniff

A node/iojs library & CLI for HTML_Codesniffer


Version published
Maintainers
1
Created

Readme

Source

AccessSniff

Build Status

A CLI and Phantom.js library for HTML_CodeSniffer

Example Image

Getting Started

Install this plugin with npm install access-sniff then use it in your project with

var accessSniff  = require('access-sniff');
var files = ['**/*.html'];

accessSniff.start(files, options);

or install the module globally and type

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

Options

You can pass some options

Accessibility Level

accessibilityLevel is a string

  options: {
    accessibilityLevel: 'WCAG2A'
  }

Levels are WCAG2A, WCAG2AA, and WCAG2AAA

Accessibilityrc

accessibilityrc is a boolean

options: {
  accessibilityrc: true
}

Set to true to access a .accessibilityrc file in your project which should be layed out as:

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

Ignore

ignore is a 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'
    ]
  }

Report Format

reportFormat is a string

  options: {
    reportFormat: 'json'
  }

Text 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 a object

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

Set a value to false to limit output

Verbose output

verbose is a boolean

  options: {
    verbose: false
  }

Output messages to console, set to true by default

DomElement

domElement is a boolean

  options: {
    domElement: false
  }

Include reference (tag name, class names & id) to reported elements. Optional for both output formats.

Force

force is a boolean

  options: {
    force: true
  }

Continue running grunt in the event of failures

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

Quiet

-q or -quiet

FAQs

Last updated on 20 Apr 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc