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

@design-parity/checks

v0.1.17

Published

Deterministic a11y + i18n spec checks over a DesignReference / CandidateRender pair. No model at run time — only committed rules and thresholds.

Downloads

3,092

Readme

@design-parity/checks

Deterministic accessibility + internationalization spec checks over a (DesignReference, CandidateRender) pair. These are the high-value, spec-backed findings the verdict leads with (see docs/PRINCIPLES.md Principle 2): the objective details developers routinely miss and design tools don't enforce.

Every check is a pure function that reads committed thresholds and the candidate's rendered semantics — no network call and no model at run time (Principle 1). The same PR always scores the same.

Checks

| Function | Kind | What it asserts | | --- | --- | --- | | checkContrast | contrast | WCAG 1.4.3/1.4.6 text contrast per theme; fails AA → error, meets AA but not AAA → info. | | checkTouchTargets | a11y | Interactive targets ≥ 48dp (Material 3); below the WCAG 2.5.8 floor of 24dp → error. | | checkSemantics | a11y | Interactive/image nodes expose an accessible label / content description. | | checkTextExpansion | i18n | Pseudolocale text growth vs available width → truncation risk (warn). | | checkLocaleFormatting | i18n | Hardcoded locale-specific currency/date/number literals in labels. | | checkRtlMirroring | i18n | Directional icons that must mirror under RTL; right-to-left text. | | checkHardcodedStrings | i18n | Un-keyed user-facing literals (opt-in — a render can't prove a string came from a resource). |

runChecks(reference, candidate, config?) runs the whole suite and returns findings a11y first, then i18n, severity-ordered within each group. runA11yChecks / runI18nChecks run one group.

Configuration

All policy is committed and overridable via ChecksConfig (contrast level, touch-target minimum, glyph-advance estimate, themes, hardcoded-string opt-in). Defaults live in src/thresholds.ts and encode WCAG 2.2

  • Material 3 + standard pseudolocale guidance.

A repo commits these knobs to design-parity.checks.json — the file @design-parity/baseline writes during bootstrap. It is read deterministically at run time so its tuned thresholds actually reach the engine (Principle 1):

  • loadChecksConfig(path) — read, parse, and schema-validate a config file; throws a readable error if it is missing, not JSON, or schema-invalid.
  • loadChecksConfigOrDefault(path) — same, but a missing file resolves to the committed defaults, so a repo in steady state with no setup still works. A present-but-invalid file still throws.
  • validateChecksConfig(value) — validate an already-parsed object against the draft-07 schema.

The config shape mirrors ChecksConfig exactly, so bootstrap output validates and loads without translation. See examples/design-parity.checks.json.

Validate CLI

design-parity-validate-checks [path ...] validates one or more config files against the schema and exits non-zero on the first invalid one, so it can gate CI. Defaults to design-parity.checks.json in the cwd.

node packages/checks/dist/cli/validate-checks.js design-parity.checks.json

Finding kinds

This package introduced the dedicated a11y and i18n FindingKinds in @design-parity/core so the verdict can cleanly lead with them. contrast keeps its own kind (it carries a numeric ratio and is the headline a11y finding). Focus order and state-announcement gaps are not asserted yet: SemanticNode does not model them, so adding those checks is a contract change in core — tracked rather than faked.

Develop

npm run build --workspace @design-parity/checks
npm test