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

olli-adapters

v2.0.2

Published

Visualization toolkit adapters for Olli, a library for converting web visualizations into accessible text structures for blind and low-vision screen reader users.

Downloads

10

Readme

Olli - Screen Reader Accessibility for Data Visualization

Olli is an open-source library for converting data visualizations into accessible text structures for screen reader users. Starting with an existing visualization specification created with a supported toolkit, Olli produces a keyboard-navigable tree view with descriptions at varying levels of detail. Users can explore these structures both to get an initial overview, and to dive into the data in more detail.

For more information about Olli, see the main project repo at https://github.com/mitvis/olli.

This is Olli's adapters package, published on npm as olli-adapters.

Adapters

Because visualization toolkits are designed with different trade-offs in mind, their APIs can vary widely. In order to support adding accessibility to the widest possible range of visualizations, Olli uses an adapter design pattern to convert visualization specifica- tions from various toolkits into a common interface that can then be rendered as accessible HTML. Olli accomplishes this by wrap- ping an instance of another visualization toolkit within an adapter function, which returns an OlliVisSpec object that corresponds to the visualization. Olli then constructs a hierarchical data structure containing descriptions for elements of the visualization, which is then rendered as an accessible tree view. Because the accessible structure is constructed from the standard OlliVisSpec interface, this process is agnostic to the details of the toolkit with which the original visualization was implemented.

To extend Olli’s coverage to support adding screen reader accessi- bility to a new toolkit, developers can simply implement an adapter function for that toolkit, without needing to re-implement the UX details of the accessible visualization. This lowers the barrier for visualization authors who lack specialized accessibility expertise to offer accessible visualization experiences.

OlliVisSpec

An adapter takes in a visualization toolkit’s output (e.g. an SVG, or a scenegraph instance) and its original specification, and returns that visualization as an object implementing the OlliVisSpec interface. An OlliVisSpec object either describes a single visualization, or contains a list of objects that each describe a single view of a multi-view chart. Each object has information about a chart’s visual elements, including its mark type and its guides (i.e. axes and legends). It also has a list of names of data fields participating in visual encodings, and other metadata such as the title. Each view’s Guide objects contain a title, the name of the field mapped to the axis/legend, and other metadata (e.g. the axis ori- entation or legend type). They also include information needed to divide axes and legends down into smaller sections (i.e., interval extents for continuous guides and categories for discrete guides), and a reference to the underlying data.

The OlliVisSpec type is defined here: https://github.com/mitvis/olli/blob/main/packages/core/src/Types.ts