Socket
Socket
Sign inDemoInstall

aria-live-storybook-addon

Package Overview
Dependencies
58
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    aria-live-storybook-addon

Observe and log aria-live region changes in the addon panel


Version published
Weekly downloads
266
increased by22.58%
Maintainers
1
Install size
63.2 kB
Created
Weekly downloads
 

Readme

Source

Aria Live Storybook Addon

Debugging ARIA live regions is cumbersome. Validating that live regions are connected should be easy, automatic, and available right in the story.

Screen Shot 2021-07-28 at 12 21 46 PM

Getting started

First, install the addon.

$ yarn add aria-live-storybook-addon

Add this line to your main.js file (create this file inside your Storybook config directory if needed).

module.exports = {
  addons: ['aria-live-storybook-addon'],
};

Once installed, you'll have a new Panel: Aria Live Regions.

This panel will observe changes to aria-live=polite and aria-live=assertive elements in your story.

Examples

Implementation examples can be found in Storybook on Chromatic.

Limitations

This addon only acklowedges the first aria-live element of types polite and assertive in a story.

In practice, an application should only have one aria-live announcer per type.

FAQ

Why aren't subsequent events showing?

When using UI libraries like React, browsers like Chrome and Firefox might not observe text changes, only additions. This is true of this addon as well as the screen reader experience.

To ensure that users of assistive technologies are able to observe changes, be sure to clear the content of aria-live elements.

If you are looking for implementation strategies, consider this implementation using React Hooks.

Additional resources

Keywords

FAQs

Last updated on 18 Aug 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc