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

accessible-web-widget

v1.6.0

Published

A lightweight, customizable accessibility widget for websites.

Readme

AccessibleWeb Widget

npm jsDelivr hits CI license

Most accessibility overlays promise to magically fix your site. This isn't that.

This is a small floating panel that gives your visitors controls they actually want — font sizing, contrast modes, a dyslexia-friendly font, animation pausing, text-to-speech, and more, in 54 languages. Think of it as the browser's built-in accessibility settings, just easier to find.

Real accessibility means semantic HTML, proper ARIA, keyboard navigation, and alt text baked into your code. No widget replaces that work. We support the Overlay Factsheet and built this as a complement, not a substitute. To find the issues actually worth fixing, run the companion Accessible Web Scanner over your sitemap.

See the demo →

⚠️ This widget does not guarantee compliance with WCAG, ADA, Section 508, or any other standard. See the full DISCLAIMER.

Quick start

Drop this into your HTML and you're done:

<script src="https://cdn.jsdelivr.net/gh/ifrederico/accessible-web-widget@latest/dist/accessible-web-widget.min.js"></script>

It initializes on page load. No config needed.

For production, pin a specific version — @latest ships new releases to your site without review:

<script src="https://cdn.jsdelivr.net/gh/ifrederico/[email protected]/dist/accessible-web-widget.min.js"></script>

Also on npm for bundler setups:

npm install accessible-web-widget
import 'accessible-web-widget'; // auto-initializes, same as the script tag

Or self-host — just download dist/accessible-web-widget.min.js and serve it yourself.

What you get

  • Profiles — One-tap presets: Seizure Safe, Vision Impaired, ADHD Friendly, Dyslexia Friendly
  • Text — Font size, bold, line height, letter spacing, readable font
  • Color — Contrast (light/dark), invert, saturation controls, high contrast
  • Reading — readable fonts (OpenDyslexic, Atkinson Hyperlegible, Lexend), reading guide, link/title highlighting, reader mode, text-to-speech, text magnifier, page structure navigator (headings/landmarks/links)
  • Interaction — Large cursor, pause animations (including videos and animated GIFs), hide images, mute sounds

Plus: 54 languages (including RTL Arabic, Hebrew, Persian, and Urdu), persistent settings, system preference detection (prefers-reduced-motion, prefers-contrast), screen-reader announcements for every toggle, keyboard accessible, and mobile friendly. The widget UI lives in a shadow root, so your site's CSS can't break it and its styles can't leak into your page.

Platform wrappers for WordPress and Shopify live in platforms/.

Configuration

Everything below is optional. The widget works with zero config.

Position, size, and language

<div data-acc-position="bottom-right"></div>  <!-- bottom-right (default) | bottom-left | top-left | top-right -->
<div data-acc-offset="24,24"></div>           <!-- x, y in pixels -->
<div data-acc-size="44"></div>                <!-- px, rem, or any CSS unit -->
<div data-acc-lang="en"></div>
<div data-acc-icon="default"></div>           <!-- default | icon-2 | icon-3 | icon-4 -->

Language resolves in this order: the visitor's own pick in the widget menu → data-acc-lang / options.lang → the page's <html lang> → the browser language → English.

Hide the button, open the panel from your own UI

If you already have a toolbar or footer link for accessibility, hide the floating button and drive the panel yourself:

<script src="…/accessible-web-widget.min.js" data-acc-hide-button="true" defer></script>

<button type="button" onclick="AccessibleWebWidget.instance.open()">Accessibility options</button>

AccessibleWebWidget.instance exposes open(), close(), and toggle(). They also work with the default button visible.

Content Security Policy

In modern browsers the widget works under a strict CSP with no configuration — styles are applied through constructable stylesheets, which style-src doesn't block. For older browsers, pass your page's nonce so the <style>-element fallback is allowed. The widget picks it up automatically from its own script tag's nonce attribute, or you can pass it explicitly:

<script nonce="YOUR_NONCE" src="…/accessible-web-widget.min.js" defer></script>
<!-- or: data-acc-nonce="YOUR_NONCE" / window.AccessibleWebWidgetOptions = { nonce: "YOUR_NONCE" } -->

If your policy locks down remote requests, also allow font-src https://accessibleweb.pages.dev for the dyslexia font (or self-host it via dyslexiaFontUrl), and — dev mode only — script-src https://cdn.jsdelivr.net for axe-core.

Text-to-speech voices

TTS uses native browser voices. When enabled, visitors click any text block to hear it read aloud.

<script>
  window.AccessibleWebWidgetOptions = {
    ttsNativeVoiceName: "Samantha",  // best-effort match
    ttsNativeVoiceLang: "en-US",
    ttsRate: 1.0,                    // 0.5 – 2.0
    ttsPitch: 1.0                    // 0 – 2.0
  };
</script>

Readable font sources

The "Readable Font" control cycles through three fonts — OpenDyslexic, Atkinson Hyperlegible, and Lexend — loaded from accessibleweb.pages.dev by default (all three are SIL OFL licensed). To self-host any of them, point the widget at your own copies:

<script>
  window.AccessibleWebWidgetOptions = {
    readableFontUrls: {
      dyslexic: "/fonts/OpenDyslexic3-Regular.woff",
      legible: "/fonts/AtkinsonHyperlegible-Regular.woff2",
      lexend: "/fonts/Lexend-Regular.woff2"
    }
    // dyslexiaFontUrl: "..." still works as a shorthand for the dyslexic entry
  };
</script>

Dev tools

Add ?acc-dev=true to any page URL to get inline annotation markers and a full accessibility report powered by axe-core. Useful for development, not meant for production.

The audit engine (axe-core) loads from the jsDelivr CDN by default, pinned to a specific version with subresource integrity. To self-host it instead:

<script>
  window.AccessibleWebWidgetOptions = {
    axeCoreUrl: "/js/axe.min.js",        // absolute or relative URL
    axeCoreIntegrity: ""                 // optional SRI hash for your copy
  };
</script>

Browser support

Chrome/Edge 88+, Firefox 78+, Safari 14+, iOS Safari 14+, Chrome for Android.

Contributing

Want to help? See CONTRIBUTING.md for setup, testing, and how to submit a PR.

Bugs

Open an issue — include your browser/version, repro steps, expected vs. actual behavior, and screenshots if you can.

License

MIT — see LICENSE.

Acknowledgments