npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

html-auditor

v0.16.0

Published

Accessibility (a11y), HTML5 and link auditor for NodeJS

Downloads

18

Readme

Build Status

A NodeJS CLI tool to fetch and audit HTML pages for web accessibility (WCAG2), HTML5 and link validation.

Installation

npm install -g html-auditor

Retreive HTML

HTML Fetch

html-audit fetch: fetch HTML pages from an XML sitemap or individual HTML page.

Options

  • --help (optional) - Display help text
  • --uri (required) - path or URL to XML Sitemap file
  • --dir (required) - directory to output HTML files
  • --map (required when --lastmod is provided) - file to output JSON that maps file names to URLs and modified files. If not set, sends to stdout
  • --lastmod (optional) - Date for downloading last modified content

Example

html-audit fetch --uri https://www.washingtonpost.com/web-national-sitemap.xml --dir ./html-pages

Audit HTML

1. Accessibility audit (WCAG)

html-audit a11y: audit HTML pages for accessibility issues.

Options

  • --help (optional) - Display help text.
  • --path [path / file] (required) - path to HTML files or an HTML file to audit
  • --standard [standard] (default: WCAG2AA) - Accessibility standard as per pa11y
  • --report [path] - path to output JSON audit report
  • --ignore [types] - types to ignore separated by semi-colons (notice;warning)
  • --map (required when --lastmod is provided) - JSON map file which holds modified files data
  • --lastmod (optional) - Scan last modified files

Example

html-audit a11y --path ./html-pages --report ./report --standard WCAG2AA --ignore 'notice;warning'

2. HTML5 validation audit

html-audit html5: audit HTML pages for HTML5 validation issues.

Options

  • --help (optional) - Display help text
  • --path [path / file] (required) - path to HTML files or an HTML file to audit
  • --report [path] - path to output JSON audit report
  • --errors-only - only report errors (no notices or warnings)
  • --map (required when --lastmod is provided) - JSON map file which holds modified files data
  • --lastmod (optional) - Scan last modified files
  • --validator (optional) - Manually specify validator service

Example

html-audit html5 --path ./html-pages --report ./report --errors-only

3. Link audit

html-audit link: audit HTML pages for link issues.

Options

  • --help (optional) - Display help text
  • --path [path / file] (required) - path to HTML files or an HTML file to audit
  • --base-uri (required) - the base URL of the site being audited
  • --report [path] - path to output JSON audit report
  • --report-verbose - verbose report
  • --map (required when --lastmod is provided) - JSON map file which holds modified files data.
  • --lastmod (optional) - Scan last modified files

Example

html-audit link --path ./html-pages --report ./report --base-uri http://example.com --report-verbose

Development

Code Standards

# Run code standard review
npm run eslint

Test

npm run test