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

@a11y-guard/cli

v1.0.0

Published

CLI for a11y-guard accessibility compliance linter

Readme

@a11y-guard/cli

Command-line tool for scanning HTML, JSX, and TSX files for accessibility violations. Maps every finding to the exact law and jurisdiction that requires it.

Install

# Global
npm install -g @a11y-guard/cli

# Or run without installing
npx a11y-guard scan 'src/**/*.tsx' --region US EU

Commands

scan

Scan files for accessibility violations.

a11y-guard scan [patterns...] [options]

Default patterns (when none are provided): src/**/*.html, src/**/*.tsx, src/**/*.jsx, public/**/*.html

| Option | Description | Default | |---|---|---| | -r, --region <regions...> | Target jurisdictions | all | | -l, --law <laws...> | Target specific laws | all | | -d, --disability-type <types...> | Filter by disability type | all | | --level <level> | WCAG conformance level: A, AA, AAA | AA | | --reporter <format> | Output format: pretty, json, sarif, github-actions, html | pretty | | -o, --output <file> | Write output to a file | — | | --fail-on <severity> | Exit 1 when error, warning, or any found | error | | -c, --config <path> | Path to a11y-guard.config.ts | — |

Examples:

# Scan all components against US + EU law
a11y-guard scan 'src/**/*.tsx' --region US EU

# Generate a shareable HTML report
a11y-guard scan 'src/**/*.tsx' --reporter html --output a11y-report.html

# CI gate — exits 1 if any error is found, annotates GitHub Actions
a11y-guard scan 'src/**/*.tsx' --reporter github-actions --fail-on error

# SARIF output for GitHub Code Scanning
a11y-guard scan --reporter sarif --output results.sarif

# Filter to visual disability rules only
a11y-guard scan --disability-type visual motor --region US

Scanning behavior:

  • .tsx / .jsx files are scanned as standalone components. Document-level rules (html-has-lang, page-title, landmark-regions, etc.) are skipped per-file.
  • After all component files are scanned, an additional app-structure pass combines all component output into a virtual document and checks for missing <main>, missing lang, and missing <title> across the entire project.
  • .html files are scanned as full documents — all rules apply.

init

Scaffold a config file and add audit scripts to package.json.

a11y-guard init [options]

| Option | Description | |---|---| | --no-scripts | Skip injecting scripts into package.json |

Creates a11y-guard.config.ts in the current directory and adds:

{
  "scripts": {
    "a11y":      "a11y-guard scan --region US EU --level AA",
    "a11y:html": "a11y-guard scan --region US EU --reporter html --output a11y-report.html",
    "a11y:ci":   "a11y-guard scan --region US EU --reporter github-actions --fail-on error"
  }
}

matrix

Print the full compliance matrix: which laws apply to which regions.

a11y-guard matrix [--region US EU] [--law ADA EAA]

Config file

// a11y-guard.config.ts
import { defineConfig } from '@a11y-guard/core';

export default defineConfig({
  regions: ['US', 'EU'],
  level: 'AA',
  failOn: 'error',
  reporter: 'pretty',
  rules: {
    'missing-alt-text': 'error',
    'color-contrast': 'error',
    'focus-visible': 'warning',
  },
});

GitHub Actions

- name: Accessibility audit
  run: |
    npx a11y-guard scan 'src/**/*.tsx' \
      --region US EU \
      --reporter github-actions \
      --fail-on error

License

MIT — see LICENSE in the root of the repository.