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 🙏

© 2025 – Pkg Stats / Ryan Hefner

a11y-button

v1.2.1

Published

A highly customizable accessibility toolbar for React applications

Readme

a11y-button

A highly customizable accessibility toolbar for React applications that helps users adjust visual and reading preferences.

Features

  • 🎨 High contrast interface
  • 📏 Adjustable text size, spacing, and line height
  • 🎯 Reading mask for better focus
  • 🔤 Multiple font options including dyslexia-friendly fonts
  • 🎯 Easy navigation mode with auto-click
  • 💾 Save and restore preferences
  • 📱 Fully responsive
  • ⌨️ Keyboard accessible
  • 🎯 WCAG compliant
  • 🔌 Zero configuration required

Installation

npm install a11y-button

Quick Start

import { AccessibilityToolbar } from 'a11y-button';
import { AccessibilityProvider } from 'a11y-button';

function App() {
  return (
    <AccessibilityProvider>
      <div>
        <AccessibilityToolbar />
        {/* Your app content */}
      </div>
    </AccessibilityProvider>
  );
}

Usage Examples

Basic Usage with Default Button

// Simple implementation with default settings
<AccessibilityProvider>
  <AccessibilityToolbar />
</AccessibilityProvider>

Custom Button Implementation

import { AccessibilityToolbar } from 'a11y-button';

function App() {
  return (
    <AccessibilityToolbar
      hideButtonWhenOpen={true}
      id="accessibility-toolbar"
    >
      <button
        id="accessibility-toolbar"
        onClick={() => {
          // Optional: Focus the toolbar after opening
          setTimeout(() => {
            window.document.getElementById("accessibility-toolbar")?.focus();
          }, 300);
        }}
      >
        Customize Accessibility
      </button>
    </AccessibilityToolbar>
  );
}

Custom Positioning

// Fixed position in top-right corner
<AccessibilityToolbar
  position="fixed"
  top="1rem"
  right="1rem"
/>

// Absolute position in bottom-left
<AccessibilityToolbar
  position="absolute"
  bottom="1rem"
  left="1rem"
/>

Custom Appearance

// Square button with palette icon
<AccessibilityToolbar
  borderRadius="4px"
  iconHandle="palette"
/>

Features Guide

Easy Navigation Mode

When enabled, this feature adds two large navigation buttons at the bottom right of the screen for scrolling up and down. Additionally, it provides an auto-click functionality:

  • Hover over any clickable element for 2 seconds to trigger a click
  • Visual progress indicator shows when auto-click will occur
  • Great for users with motor difficulties

Reading Mask

A focused reading aid that:

  • Dims the entire page except for the current reading area
  • Follows mouse movement
  • Helps users focus on specific content
  • Adjustable mask size based on text size

Text Customization

Comprehensive text adjustment options:

  • Font size scaling
  • Line height adjustment
  • Letter spacing
  • Word spacing
  • Multiple font families including dyslexia-friendly options

Visual Aids

Various visual enhancement features:

  • High contrast mode
  • Custom color schemes
  • Black and white image conversion
  • Link highlighting
  • Layout simplification

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | position | 'fixed' | 'absolute' | 'fixed' | Position of the trigger button | | top | string | undefined | Top position | | right | string | '1rem' | Right position | | bottom | string | '1rem' | Bottom position | | left | string | undefined | Left position | | borderRadius | string | '50%' | Border radius of the trigger button | | iconHandle | 'settings' | 'eye' | 'palette' | 'type' | 'layout' | 'settings' | Icon to display in the trigger button | | children | ReactNode | undefined | Custom trigger element | | hideButtonWhenOpen | boolean | false | Hide the trigger button when toolbar is open | | id | string | undefined | ID for the toolbar (required when using custom button) |

Persistence

User preferences are automatically saved to localStorage and restored on page reload.

Browser Support

  • Chrome (latest)
  • Firefox (latest)
  • Safari (latest)
  • Edge (latest)

Contributing

Contributions are welcome! Please read our contributing guidelines for details.

License

MIT