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 🙏

© 2026 – Pkg Stats / Ryan Hefner

wcag-audit

v1.0.0

Published

WCAG accessibility audit CLI — scan websites for accessibility violations with actionable reports

Readme

wcag-audit

Scan any website for WCAG accessibility violations from your terminal.

Built for government teams, compliance officers, and developers who need Section 508 and WCAG 2.1/2.2 conformance.

Try it now

No install needed:

npx wcag-audit scan https://example.com

Features

  • Single page scan — audit any URL for WCAG violations
  • Sitemap crawling — scan entire sites via sitemap.xml
  • Configurable level — WCAG A, AA, or AAA
  • Multiple formats — terminal, JSON, CSV
  • Severity breakdown — critical, serious, moderate, minor
  • WCAG criterion mapping — know exactly which criteria fail
  • CI/CD ready — non-zero exit when violations found
  • Programmatic API — integrate into your pipeline

Install

npm install -g wcag-audit

Usage

# Scan a page at AA level (default)
wcag-audit scan https://example.gov

# Scan at AAA level
wcag-audit scan https://example.gov --level AAA

# JSON output for CI pipelines
wcag-audit scan https://example.gov --format json --output report.json

# CSV for spreadsheet analysis
wcag-audit scan https://example.gov --format csv --output report.csv

# Crawl an entire site via sitemap
wcag-audit crawl https://example.gov/sitemap.xml --max-pages 100

# Custom viewport (mobile testing)
wcag-audit scan https://example.gov --viewport 375x812

Example Output

════════════════════════════════════════════════════
  WCAG ACCESSIBILITY AUDIT REPORT
════════════════════════════════════════════════════

  URL:      https://example.gov
  Title:    Example Government Site
  Level:    WCAG AA
  Scanned:  2026-03-27T23:00:00.000Z

  Critical: 2  Serious: 5  Moderate: 8  Minor: 3

  [critical] image-alt: Images must have alternate text
    WCAG: wcag2a, wcag111
    Help: https://dequeuniversity.com/rules/axe/4.10/image-alt
    Elements affected: 4
      → img.hero-banner
        Fix any of the following: Element does not have an alt attribute

  [serious] color-contrast: Elements must meet minimum color contrast ratio
    WCAG: wcag2aa, wcag143
    Help: https://dequeuniversity.com/rules/axe/4.10/color-contrast
    Elements affected: 12
      → .nav-link
        Fix any of the following: Element has insufficient color contrast

════════════════════════════════════════════════════

CI/CD Integration

The CLI exits with code 1 when violations are found:

# GitHub Actions
- name: Accessibility Audit
  run: npx wcag-audit scan ${{ env.DEPLOY_URL }} --level AA

# GitLab CI
accessibility:
  script: npx wcag-audit scan $DEPLOY_URL --format json --output a11y.json
  artifacts:
    paths: [a11y.json]

Programmatic API

const { scanUrl, formatTextReport } = require('wcag-audit');

const results = await scanUrl('https://example.gov', {
  level: 'AA',
  viewport: { width: 1280, height: 720 },
});

console.log(`Violations: ${results.summary.totalViolations}`);
console.log(`Critical: ${results.summary.impactBreakdown.critical}`);
console.log(formatTextReport(results));

How It Works

  1. Launches headless Chromium via Puppeteer
  2. Navigates to the URL, waits for network idle
  3. Injects axe-core into the page
  4. Runs accessibility audit filtered to specified WCAG level
  5. Collects violations, passes, and incomplete checks
  6. Formats results (text, JSON, or CSV)

Powered by

  • axe-core — the accessibility testing engine used by Google, Microsoft, and government agencies worldwide
  • Puppeteer — headless Chrome for reliable page rendering

License

MIT