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

@watershed-labs/a11y

v0.0.1

Published

Accessibility scanning, WCAG 2.2 helpers, and ARIA assertions for Watershed test suites

Downloads

28

Readme

@watershed-labs/a11y

Accessibility scanning, WCAG 2.2 helpers, and ARIA assertions for the Watershed ecosystem.

Part of the Watershed testing ecosystem.


Overview

@watershed-labs/a11y wraps @axe-core/webdriverjs with pre-configured WCAG 2.2 rule sets and adds helpers for the criteria axe-core does not cover automatically — focus visibility, target size, and ARIA live region assertions via WebDriver BiDi DOM mutation events.

It lives as a shared package rather than inside create-otter because create-egret and create-salamander both require accessibility scanning too. One implementation, consistently applied across all browser and mobile templates.

axe-core covers approximately 40–60% of WCAG 2.2 success criteria automatically. The remainder requires manual testing. Automated scanning is a necessary floor, not a ceiling.


Installation

npm install @watershed-labs/a11y

Usage

import { A11yScanner } from '@watershed-labs/a11y';

const scanner = new A11yScanner(driver);

// Full page scan
const results = await scanner.scan({ wcagLevel: 'AA' });
await scanner.assertNoViolations(results);

// Scoped to a region
const results = await scanner.scan({
    context: '#checkout-form',
    wcagLevel: 'AA',
});

// WCAG 2.2 — new criteria helpers
await scanner.assertFocusVisible(submitButton);
await scanner.assertTargetSize(submitButton);

// ARIA live region — uses BiDi DOM mutation events
await scanner.assertLiveRegion('[role="status"]', 'Order placed successfully');

API

| Method | Description | |---|---| | scan(options?) | Runs axe-core on the current page or scoped context. Returns structured violation results. | | assertNoViolations(results) | Throws a formatted, readable error if any critical or serious violations are present. | | assertFocusVisible(element) | Asserts that the element has a visible focus indicator. Uses computed style check. WCAG 2.2 criterion 2.4.7. | | assertTargetSize(element, minPx?) | Asserts WCAG 2.2 criterion 2.5.8 minimum interactive target size. Default 24px. | | assertLiveRegion(selector, expectedText) | Uses BiDi DOM mutation events to assert that an ARIA live region updates with the expected text. |


WCAG 2.2 Coverage

| Criterion | Method | Coverage type | |---|---|---| | 1.1.1 Non-text Content | scan() | Automated | | 1.4.3 Colour Contrast AA | scan() | Automated | | 1.4.11 Non-text Contrast | scan() | Automated | | 2.1.1 Keyboard Accessible | Manual scenario | Manual | | 2.4.7 Focus Visible | assertFocusVisible() | Automated | | 2.5.8 Target Size Minimum | assertTargetSize() | Automated | | 4.1.2 Name, Role, Value | scan() | Automated | | 4.1.3 Status Messages | assertLiveRegion() | Automated |


Parallel Safety

Safe. Each A11yScanner instance holds a reference to a single driver session. Workers never share scanner instances.


Dependency

Requires @axe-core/webdriverjs — the correct Selenium integration package. @axe-core/selenium does not exist.


Licence

MIT — part of the Watershed ecosystem.