Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@daniel.husar/a11y-static-report

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@daniel.husar/a11y-static-report

Accessibility report via axe for static pages

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-83.33%
Maintainers
1
Weekly downloads
 
Created
Source

a11y-static-report Build Status

Run accessibility report on static pages via axe-core

demo.gif

How it works

It starts the static webserver and look up for all html files inside of it. From the html files we generate routes and use them as input for a11y-report.

Install

yarn add --dev @daniel.husar/a11y-static-report

or

npm install --dev @daniel.husar/a11y-static-report

Usage

import a11yStaticReport from '@daniel.husar/a11y-static-report';

(async () => {
  await a11yStaticReport({
    folder: 'public',
  });
})();

API

a11yStaticReport(config)

Prints accessibility report with logger function and returns promise that resolves for not errors or reject if there is any error.

config
PropertyTypeDefaultDescription
portnumber9001Port on which static server will start.
folderstringpublicFolder with static files to serve.
excludeFilesarray<string∣RegExp>[]Array of files to ignore. Could be string or RegExp. Example ['blog/index.html', /^de\/blog/]
debugbooleanfalsePrints debug messages.

Every other option that you pass, will be forwarded into a11y-report.

Cli

yarn add --dev @daniel.husar/a11y-static-report
yarn a11y-static-report --folder=out

For more complex config options you can use .a11yrc file in the root of your project:

.a11yrc

module.exports = {
  port: 9001,
  folder: 'out',
  reporter: 'simple'
}

License

MIT

Keywords

FAQs

Package last updated on 09 Jul 2019

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc