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

@airforcerp/accessibility-widget

v1.0.4

Published

A comprehensive, lightweight accessibility plugin that provides extensive customization options including text-to-speech, color blindness filters, and many other accessibility features. WCAG 2.2 Level AA Compliant.

Downloads

460

Readme

Accessibility Widget by AirforceRP

npm version License WCAG

A comprehensive, lightweight, WCAG 2.1 Level AA compliant accessibility plugin that provides extensive customization options including text-to-speech, color blindness filters, and many other accessibility features.

📦 Installation

npm

npm install @airforcerp/accessibility-widget

yarn

yarn add @airforcerp/accessibility-widget

pnpm

pnpm add @airforcerp/accessibility-widget

🚀 Quick Start

Option 1: Using jsDelivr CDN (Recommended)

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>My Accessible Website</title>
    
    <!-- Boxicons (Required) -->
    <link href="https://unpkg.com/[email protected]/css/boxicons.min.css" rel="stylesheet">
    
    <!-- Accessibility Plugin CSS -->
    <link href="https://cdn.jsdelivr.net/npm/@airforcerp/accessibility-widget@latest/accessibility-plugin.css" rel="stylesheet">
</head>
<body>
    <h1>Welcome to My Website</h1>
    
    <!-- TTS Module for Multi-Language Support (Optional but Recommended) -->
    <script src="https://cdn.jsdelivr.net/npm/@airforcerp/accessibility-widget@latest/tts.js"></script>
    
    <!-- Optional: Custom Configuration -->
    <script>
        var AccessibilityConfig = {
            position: 'bottom-right',
            buttonText: 'Accessibility',
            fontSize: 100,
            contrast: 'normal',
            ttsLanguage: 'en' // en, es, de, fr, zh, ko, no
        };
    </script>
    
    <!-- Accessibility Plugin JavaScript (Must be loaded last) -->
    <script src="https://cdn.jsdelivr.net/npm/@airforcerp/accessibility-widget@latest/accessibility-plugin.js"></script>
</body>
</html>

Option 2: Using npm Package

If you're using a bundler (webpack, vite, etc.):

// Import CSS
import '@airforcerp/accessibility-widget/accessibility-plugin.css';

// Import and configure
import '@airforcerp/accessibility-widget/accessibility-config.js';
import '@airforcerp/accessibility-widget/accessibility-plugin.js';

Or in HTML after installing via npm:

<!-- Boxicons (Required) -->
<link href="https://unpkg.com/[email protected]/css/boxicons.min.css" rel="stylesheet">

<!-- From node_modules -->
<link rel="stylesheet" href="./node_modules/@airforcerp/accessibility-widget/accessibility-plugin.css">
<script src="./node_modules/@airforcerp/accessibility-widget/accessibility-config.js"></script>
<script src="./node_modules/@airforcerp/accessibility-widget/accessibility-plugin.js"></script>

⚙️ Configuration

Customize the plugin by creating a configuration object:

<script>
    var AccessibilityConfig = {
        // Widget position: 'bottom-left' or 'bottom-right'
        position: 'bottom-right',
        
        // Button text
        buttonText: 'Accessibility',
        
        // Show reset button
        showReset: true,
        
        // Default font size (75, 100, 125, 150, 200)
        fontSize: 100,
        
        // Default contrast: 'normal', 'high', or 'dark'
        contrast: 'normal',
        
        // Default line height: 'normal' or 'large'
        lineHeight: 'normal',
        
        // Default letter spacing: 'normal' or 'wide'
        letterSpacing: 'normal',
        
        // Default font family: 'default', 'sans-serif', 'serif', 'monospace'
        fontFamily: 'default',
        
        // Color blindness filter: 'none', 'protanopia', 'deuteranopia', 'tritanopia', 'achromatopsia'
        colorBlindness: 'none',
        
        // Enable features by default
        focusIndicator: false,
        readingGuide: false,
        readingMask: false,
        textHighlight: false,
        stopAnimations: false,
        underlineLinks: false,
        showImageAlt: false,
        ttsEnabled: false,
        
        // TTS settings
        ttsRate: 1.0,
        ttsPitch: 1.0,
        ttsVolume: 1.0,
        ttsVoice: 'default',
        
        // TTS Language: 'en' (English), 'es' (Español), 'de' (Deutsch), 
        // 'fr' (Français), 'zh' (中文/Mandarin), 'ko' (한국어), 'no' (Norsk)
        ttsLanguage: 'en'
    };
</script>
<script src="https://cdn.jsdelivr.net/npm/@airforcerp/accessibility-widget@latest/accessibility-plugin.js"></script>

🌍 Multi-Language TTS Support

The plugin includes a dedicated tts.js module that provides automatic language detection and support for 7 languages:

  1. English (en) - Default
  2. Español (es) - Spanish
  3. Deutsch (de) - German
  4. Français (fr) - French
  5. 中文 (zh) - Mandarin Chinese
  6. 한국어 (ko) - Korean
  7. Norsk (no) - Norwegian

Automatic Language Detection

The TTS module automatically detects the language of text being read based on:

  • Character patterns (Chinese, Korean)
  • Common words (English, Spanish, German, French, Norwegian)
  • Page language attribute (<html lang="...">)

Manual Language Selection

Users can manually select a language from the "TTS Language" dropdown in the accessibility panel.

✨ Features

  • 20+ Accessibility Features
  • WCAG 2.2 Level AA Compliant
  • Multi-Language Text-to-Speech (TTS)
    • English (en)
    • Español / Spanish (es)
    • Deutsch / German (de)
    • Français / French (fr)
    • 中文 / Mandarin (zh)
    • 한국어 / Korean (ko)
    • Norsk / Norwegian (no)
  • Color Blindness Filters
  • Reading Tools (Guide, Mask, Highlight)
  • Font & Display Customization
  • Keyboard Navigation
  • Screen Reader Support
  • Mobile Friendly

📚 Documentation

🔗 CDN Links

jsDelivr (Recommended)

  • CSS: https://cdn.jsdelivr.net/npm/@airforcerp/accessibility-widget@latest/accessibility-plugin.css
  • JS: https://cdn.jsdelivr.net/npm/@airforcerp/accessibility-widget@latest/accessibility-plugin.js
  • Config: https://cdn.jsdelivr.net/npm/@airforcerp/accessibility-widget@latest/accessibility-config.js

unpkg

  • CSS: https://unpkg.com/@airforcerp/accessibility-widget@latest/accessibility-plugin.css
  • JS: https://unpkg.com/@airforcerp/accessibility-widget@latest/accessibility-plugin.js
  • Config: https://unpkg.com/@airforcerp/accessibility-widget@latest/accessibility-config.js

🆘 Support

📄 License

MIT License - Free to use and modify

👨‍💻 Author

AirforceRP


Version: 1.0.0
Last Updated: November 2025