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-toolkit

v2.0.0

Published

A comprehensive accessibility toolkit — audit mode for developers, UI panel for end-users

Readme

a11y-toolkit

A comprehensive, zero-dependency accessibility toolkit for web apps. Ships as an NPM package with two modes: a floating UI panel for end-users and a developer audit API for programmatic use.


Features

| Module | What it does | |---|---| | 🎨 ContrastChecker | Scans DOM for WCAG 2.1 AA contrast violations | | 🔤 FontScaler | Adjusts root font size (0.8×–2.0×) | | 🔒 FocusTrap | Traps keyboard focus inside modals/dialogs | | 🦻 AriaHelper | Detects missing alt, labels, roles — auto-fix option | | 🌑 HighContrast | High contrast + dark mode (CSS invert) | | 📖 DyslexiaFont | OpenDyslexic font + improved letter/line spacing | | 🎞️ MotionReducer | Disables all animations/transitions | | ⌨️ KeyboardNav | Enhanced focus rings + skip-to-content link |


Installation

npm install a11y-toolkit

Usage

End-User Panel Mode

Mounts a floating ♿ button that opens an accessible settings panel.

import { A11yToolkit } from 'a11y-toolkit';
import 'a11y-toolkit/dist/a11y-toolkit.css'; // optional — bundled styles

const toolkit = new A11yToolkit({ mode: 'panel' });
toolkit.mount(); // call after DOM is ready

Developer Audit Mode

Use the JS API directly — no UI panel.

import { A11yToolkit } from 'a11y-toolkit';

const toolkit = new A11yToolkit({ mode: 'audit' });

// Run full audit (logs to console)
toolkit.audit();

// Individual modules
toolkit.contrastChecker.run();         // returns { total, violations }
toolkit.ariaHelper.scan();             // returns array of issues
toolkit.ariaHelper.fix(true);          // auto-fix missing ARIA attributes

Both (default)

const toolkit = new A11yToolkit({ mode: 'both' });
toolkit.mount();

Individual Module Imports (tree-shakeable)

import { FocusTrap } from 'a11y-toolkit';

const trap = new FocusTrap();
trap.trap(document.querySelector('#modal'));  // trap focus
trap.release();                               // release + restore previous focus
import { HighContrast } from 'a11y-toolkit';
const hc = new HighContrast();
hc.enable('highContrast');  // or 'dark'
hc.toggle('dark');
hc.disable();
import { FontScaler } from 'a11y-toolkit';
const fs = new FontScaler();
fs.setScale(1.25);   // 125% font size
fs.increase();       // +10%
fs.decrease();       // -10%
fs.reset();
import { MotionReducer } from 'a11y-toolkit';
const mr = new MotionReducer();
mr.autoDetect();     // respects prefers-reduced-motion
mr.reduce();
mr.restore();
import { KeyboardNav } from 'a11y-toolkit';
const kn = new KeyboardNav();
kn.highlight();      // enhanced focus rings + skip link
kn.remove();
import { DyslexiaFont } from 'a11y-toolkit';
const df = new DyslexiaFont();
df.apply();   // OpenDyslexic + spacing
df.remove();
df.toggle();

Options

new A11yToolkit({
  mode: 'both',            // 'panel' | 'audit' | 'both'
  autoDetectMotion: true,  // auto-apply reduced motion if OS prefers it
});

Cleanup

toolkit.destroy(); // removes panel, resets all styles

Dev Setup

git clone <repo>
cd a11y-toolkit
npm install
npm run dev       # start dev server with demo page
npm run build     # build to /dist

WCAG Compliance

This toolkit helps achieve WCAG 2.1 Level AA compliance by addressing:

  • 1.4.3 Contrast (Minimum)
  • 1.4.4 Resize Text
  • 1.4.10 Reflow
  • 2.1.1 Keyboard
  • 2.4.3 Focus Order
  • 2.4.7 Focus Visible
  • 3.3.2 Labels or Instructions
  • 4.1.2 Name, Role, Value

License

MIT