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

a11y-widget

v1.0.4

Published

Widget d'accessibilité

Readme

accessibility-widget

npm license

Widget d'accessibilité React aligné RGAA 4.1 / WCAG 2.1 AA, conçu pour rendre les sites et services numériques accessibles à toutes et à tous.

Installation

npm install a11y-widget

Usage

import { AccessibilityWidget } from "accessibility-widget";
import "accessibility-widget/dist/accessibility-widget.css";

export default function App() {
  return (
    <>
      <AccessibilityWidget position="bottom-right" lang="fr" />
    </>
  );
}

Props

| Prop | Type | Défaut | Description | | ------------ | -------------------------------------------------------------------- | --------------------- | ---------------------------------------------------- | | position | "bottom-right" | "bottom-left" | "top-right" | "top-left" | "bottom-right" | Position du bouton flottant | | lang | "fr" | "en" | "fr" | Langue de l'interface | | storageKey | string | "a11y-widget-prefs" | Clé localStorage pour la persistance des préférences |

Fonctionnalités

RGAA 3 - Couleurs

  • Contraste élevé
  • Inversion des couleurs

RGAA 10 - Présentation de l'information

  • Taille du texte (×1 / ×1.2 / ×1.4 / ×1.6)
  • Hauteur de ligne augmentée
  • Espacement des lettres
  • Espacement des mots
  • Alignement du texte à gauche
  • Police lisible (serif) ou dyslexique (OpenDyslexic)

RGAA 13 - Consultation

  • Réduction des animations
  • Mise en pause des animations

Navigation au clavier

  • Indicateur de focus renforcé
  • Mise en évidence des liens

Aide à la lecture

  • Guide de lecture (réticule horizontal)
  • Masque de lecture

Accessibilité du widget lui-même

Le widget est lui-même conforme RGAA :

  • Bouton trigger avec aria-label, aria-expanded, aria-haspopup="dialog"
  • Dialog avec role="dialog", aria-modal, aria-labelledby
  • Focus-trap dans le panneau (Tab / Shift+Tab)
  • Fermeture par Échap avec retour du focus sur le trigger
  • Switches avec role="switch", aria-checked, aria-labelledby
  • Annonces des changements d'état via aria-live="polite"
  • Compatible NVDA + Firefox, JAWS + Firefox, VoiceOver + Safari, TalkBack + Chrome

Environnements de test recommandés (RGAA)

| Environnement | OS | | ------------------------------------- | ----------- | | NVDA (dernière version) + Firefox | Windows | | JAWS (version précédente) + Firefox | Windows | | VoiceOver (dernière version) + Safari | macOS / iOS | | TalkBack (dernière version) + Chrome | Android |

Usage avancé

Usage headless (hooks uniquement)

import { useA11yStore, useA11yEffects } from "accessibility-widget";

function MonWidget() {
  const { state, dispatch } = useA11yStore("a11y-widget-prefs");
  useA11yEffects(state);

  return (
    <button onClick={() => dispatch({ type: "TOGGLE_HIGH_CONTRAST" })}>
      Contraste élevé
    </button>
  );
}

Personnalisation CSS

Toutes les couleurs et dimensions sont en custom properties CSS :

:root {
  --a11y-color-bg: #1a1a2e; /* couleur du bouton et header */
  --a11y-color-accent: #005fcc; /* couleur d'accentuation */
  --a11y-panel-width: 340px; /* largeur du panneau */
  --a11y-radius: 12px; /* rayon des bordures */
}

Référence

Licence

MIT © Jessy DAVID