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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@takingitglobal/a11ize

v1.2.10

Published

A React and JS Accessibility Toolkit

Downloads

38

Readme

a11ize

Demo of a11ize

A React-based accessibility toolkit to make any website accessible. a11ize is fast, extensible, and most importantly, lightweight (21.55 kb gzipped without core-js).

Check out a live demo at https://risingyouth.ca.

a11ize is based on the Fluid preferences framework.

Features

  • Text Sizing
  • Font Style
    • Bundles Open Dyslexic by default
  • Line Spacing
  • Word Spacing
  • Custom high-contrast colour filters
  • Enhanced Inputs
  • Table of Contents
    • Dynamically generated from semantic HTML
  • i18n Support (PRs welcomed!)

Usage notes

  • Ensure that text sizes are defined in rems

Installation

npm install @takingitglobal/a11ize

React usage

Wrap the content you want to be modified by a11ize in the AccessibilityButton tag.

  import A11yWrapper from "@takingitglobal/a11ize"
  ...
  <A11yWrapper {...options}>
    Site content here.
  </A11yWrapper>

Non-React usage

Add the id of accessible-content to an element so that it wraps the content you want a11ize to affect (generally the entire page).

<div id="accessible-content">Site content here.</div>
<script>
  A11ySettings = {
    ...options,
  };
</script>
<script src="https://cdn.jsdelivr.net/npm/@takingitglobal/a11ize@1/dist/with-react/index.js"></script>

For wider browser compability, use the version with CoreJS bundled in.

<div id="accessible-content">Site content here.</div>
<script>
  A11ySettings = {
    ...options,
  };
</script>
<script src="https://cdn.jsdelivr.net/npm/@takingitglobal/a11ize@1/dist/with-react-cjs/index.js"></script>

Cache times on jsdelivr are relatively long, so if you want the latest release replace the @1 with the version you'd like to use.

Options

All options are optional and default to the values below.

{
  primaryColor: '#921d5b',
  secondaryColor: '#01364c',
  buttonColor: '#fff', // text colour of the a11y button
  activePanels: [ // enable/disable panels as needed
    'textsize',
    'fontfamily',
    'linespacing',
    'letterspacing',
    'wordspacing',
    'contrast',
    'clickables',
    'toc',
  ],
  lang: 'en', // fallback to 'en' if set ISO code is not found
  // for non-React usage
  wrapperId: 'accessible-content' // override the a11ize target element
}

Contributing

Translations & i18n

If you're able to translate the text in a11ize to another language, please make a PR with the new YAML file of translations. Example YAML files are in src/i18n/en.yml. The translated text should match to the appropriate key, with the language code as the filename.

Credits

a11ize is largely inspired by OCAD University's Infusion framework, which is a part of the Fluid Project. We aimed to create a lighter, and more widely usable a11y toolkit that could work for any website with minimal modifications.

Font Usage

a11ize bundles the Open Dyslexic font face by default. Please make sure to abide by their licensing rules if you choose to use Open Dyslexic in your own projects.