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

sa11y

v3.1.5

Published

Sa11y is an accessibility quality assurance tool that visually highlights common accessibility and usability issues. Geared towards content authors, Sa11y straightforwardly identifies errors or warnings at the source with a simple tooltip on how to fix th

Downloads

979

Readme

Sa11y, the accessibility quality assurance tool.

Over several hundred monthly requests on jsDelivr. License: GPL v2 npm version

Features

  • Over 50 checks that encourage quality accessibility.
    • Checks for issues regarding images, headings, links, form labels, and more.
    • Toggleable/optional checks: readability analysis, contrast checking, and colour filters.
  • Automatic: checks content on page load.
  • Customizable: JSON-like props to fine tune the experience for content authors.
  • Focus on the issues: Turn off or hide irrelevant checks.
  • Scalable: Check every page for accessibility.
  • Support for checking items within web components/shadow DOM and headless checks.
  • Fully encapsulated user interface with dark mode.
  • Offered in various languages.

Contributing

Want to help translate or improve Sa11y? Consider contributing! Translations may either be contributed back to the repository with a pull request, or translated files can be returned to: [email protected]. When submitting a pull request, please ensure you create your translated file within the /src/js/lang/ directory.

Contact

Have a question or any feedback? Email: [email protected]

Install

Sa11y is a framework-agnostic JavaScript plugin. It's made with vanilla JavaScript and CSS, and its only dependency is Tippy.js - a highly customizable tooltip library that features a positioning system.

To install on your website, insert Sa11y right before the closing </body> tag. Sa11y consists of three files:

  • sa11y.css - The main stylesheet. Should be included in the <head> of the document (if possible).
  • lang/en.js - All text strings and tooltip messages. View supported languages.
  • sa11y.js - Contains all logic.

NPM

npm i sa11y

Example installation (modules)

<!-- Stylesheet -->
<link rel="stylesheet" href="css/sa11y.min.css"/>

<!-- JavaScript -->
<script type="module">
  import { Sa11y, Lang } from '../assets/js/sa11y.esm.js';
  import Sa11yLangEn from '../assets/js/lang/en.js';

  // Set translations
  Lang.addI18n(Sa11yLangEn.strings);

  // Instantiate
  const sa11y = new Sa11y({
    checkRoot: "body",
    // Customize with props.
  });
</script>

Example installation (regular script)

<!-- Stylesheet -->
<link rel="stylesheet" href="css/sa11y.min.css"/>

<!-- JavaScript -->
<script src="/dist/js/sa11y.umd.min.js"></script>
<script src="/dist/js/lang/en.umd.js"></script>

<!-- Instantiate -->
<script>
  Sa11y.Lang.addI18n(Sa11yLangEn.strings);
  const sa11y = new Sa11y.Sa11y({
    checkRoot: "body",
    // Customize with props.
  });
</script>

CDN

Please visit developer documentation for CDN installation instructions.

Development environment

A light server for development is included. Any change inside /src folder files will trigger the build process for the files and will reload the page with the new changes. To use this environment:

  1. Ensure node is installed and up to date (at least v20 and up).
  2. Clone this repo.
  3. Run npm install
  4. Run npm run serve. Then open http://localhost:8080/docs/demo/en/ in your browser.
  5. For unit tests, execute npm run test while the server is running.

Tip! To speed up compile time while developing, navigate to rollup.config.js and change developmentMode to true. This will only compile javascript, SCSS, and English translation strings.