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

axe-audit

v1.1.0

Published

Accessibility audit CLI powered by axe-core and Playwright

Readme

axe-audit

Accessibility audit CLI powered by axe-core and Playwright. Automatically checks WCAG compliance of your static site with no configuration required.

日本語

Features

  • No configuration required — Works out of the box with sensible defaults
  • Automatic page discovery — Recursively scans build output for HTML files
  • 18 languages — axe-core messages in 18 locales (default: Japanese)
  • Multiple output formats — HTML (browser) / JSON / CSV
  • Package manager auto-detection — Detects npm / yarn / pnpm / bun from lock files
  • Page exclusion — Exclude pages by glob patterns (e.g. CMS-generated pages)
  • CI/CD ready — Auto-detects CI environments, exit codes for pipeline integration

Installation

npm install -D axe-audit
npx playwright install chromium

Quick Start

1. Generate a config file (optional)

npx axe-audit init

Creates axe-audit.config.mjs in your project root.

2. Run the audit

npx axe-audit

Build → page discovery → accessibility testing → report display runs automatically.

CLI Reference

Commands

| Command | Description | | --- | --- | | axe-audit | Run accessibility audit | | axe-audit init | Generate config file axe-audit.config.mjs |

Flags

| Flag | Description | | --- | --- | | --no-build | Skip the build step | | --json | Output JSON report (axe-audit/report.json) | | --csv | Output CSV report (axe-audit/report.csv) | | --help | Show help | | --version | Show version |

Configuration

All options for axe-audit.config.mjs generated by axe-audit init:

// @ts-check
import { defineConfig } from "axe-audit";

export default defineConfig({
  dist: "dist",
  buildCommand: undefined,
  noBuild: false,
  port: 3000,
  json: false,
  csv: false,
  showIncomplete: false,
  showPasses: false,
  showInapplicable: false,
  excludePages: [],
  axe: {
    tags: undefined,
    locale: "ja",
    aaa: false,
    experimental: false,
    disableRules: [],
    include: [],
    exclude: [],
  },
});

Top-Level Options

| Option | Type | Default | Description | | --- | --- | --- | --- | | dist | string | "dist" | Build output directory | | buildCommand | string | undefined | Custom build command. Auto-detects PM when unset | | noBuild | boolean | false | Skip the build step | | port | number | 3000 | Local server port | | json | boolean | false | Output JSON report | | csv | boolean | false | Output CSV report | | showIncomplete | boolean | false | Show incomplete (needs review) rules in HTML report | | showPasses | boolean | false | Show passing rules in HTML report | | showInapplicable | boolean | false | Show inapplicable rules in HTML report | | excludePages | string[] | [] | Glob patterns to exclude pages (e.g. ["**/interview/*/*", "404.html"]) |

excludePages Patterns

Uses glob syntax to match page paths relative to dist/.

| Pattern | Matches | Does NOT match | | --- | --- | --- | | **/interview/*/* | saiyo/interview/01/index.html | saiyo/interview/index.html | | **/draft/** | blog/draft/post.html | blog/post.html | | 404.html | 404.html | about/404.html |

Supported wildcards: ** (any directory depth), * (any characters except /), ? (single character).

axe Sub-Options

| Option | Type | Default | Description | | --- | --- | --- | --- | | tags | string[] | undefined | Filter rules by tag (e.g. ["wcag2a", "wcag2aa"]). All rules enabled when unset | | locale | string | "ja" | Language for axe-core messages. Set to undefined for English | | aaa | boolean | false | Include WCAG AAA level tests | | experimental | boolean | false | Include experimental rules | | disableRules | string[] | [] | Rule IDs to disable (e.g. ["color-contrast"]) | | include | string[] | [] | CSS selectors to audit. Empty array for entire page | | exclude | string[] | [] | CSS selectors to exclude (e.g. [".third-party", "iframe"]) |

Output Formats

HTML (default)

A custom HTML report is generated (axe-audit/report.html) and opens automatically in your browser via a local HTTP server. On macOS, Google Chrome is used if installed; otherwise the default browser is used. Skipped in CI environments.

The report includes audited pages and excluded pages sections at the bottom, showing which pages were tested and which were excluded by excludePages patterns.

JSON

Enable with the --json flag or json: true in config. Outputs axe-audit/report.json.

{
  "metadata": {
    "axeVersion": "4.10.0",
    "timestamp": "2025-01-01T00:00:00.000Z",
    "toolVersion": "1.1.0",
    "auditedPages": ["/", "/about/", "/contact/"],
    "excludedPages": ["/admin/", "/draft/"]  // only present when excludePages is set
  },
  "pages": [
    {
      "url": "/",
      "violations": [
        {
          "id": "color-contrast",
          "impact": "serious",
          "tags": ["wcag2aa"],
          "description": "...",
          "help": "...",
          "helpUrl": "...",
          "nodes": [
            {
              "html": "<p style=\"color: #aaa\">...</p>",
              "target": ["p:nth-child(2)"],
              "failureSummary": "..."
            }
          ]
        }
      ],
      "incomplete": [],
      "passes": [],
      "inapplicable": []
    }
  ],
  "summary": {
    "totalPages": 3,
    "totalViolations": 1,
    "totalIncomplete": 0,
    "pagesWithViolations": 1,
    "pagesWithErrors": 0
  }
}

CSV

Enable with the --csv flag or csv: true in config. Outputs axe-audit/report.csv (UTF-8 with BOM for Excel compatibility).

| Column | Description | | --- | --- | | page | URL of the audited page | | type | Result type (violations / incomplete / passes / inapplicable) | | impact | Severity (critical / serious / moderate / minor) | | ruleId | Rule ID | | help | Help text | | html | HTML snippet of the target element | | target | CSS selector(s) of the target element | | failureSummary | Specific failure reason | | wcag | Applicable WCAG criteria | | helpUrl | URL to detailed help |

Supported Locales

axe-core messages can be displayed in 18 languages. Set the language code in axe.locale.

| Code | Language | | --- | --- | | da | Danish | | de | German | | el | Greek | | es | Spanish | | eu | Basque | | fr | French | | he | Hebrew | | it | Italian | | ja | Japanese (default) | | ko | Korean | | nl | Dutch | | no_NB | Norwegian Bokmål | | pl | Polish | | pt_BR | Portuguese (Brazil) | | pt_PT | Portuguese (Portugal) | | ru | Russian | | zh_CN | Chinese (Simplified) | | zh_TW | Chinese (Traditional) |

For English, set locale to undefined or omit the key.

License

MIT