Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

storybook-addon-a11y

Package Overview
Dependencies
Maintainers
6
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

storybook-addon-a11y

a11y addon for storybook

  • 3.1.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
955
decreased by-5.26%
Maintainers
6
Weekly downloads
 
Created
Source

storybook-addon-a11y

This storybook addon can be helpfull to make you're UI components more accessibile.

Getting started

First, install the addon.

$ npm install -D storybook-addon-a11y

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

import 'storybook-addon-a11y/register';

import the 'checkA11y' decorator to check you're stories for violations within your components.

import React from 'react';
import { storiesOf } from '@storybook/react';

import { checkA11y } from 'storybook-addon-a11y';

storiesOf('button', module)
  .addDecorator(checkA11y)
  .add('Accessible', () => (
    <button>
      Accessible button
    </button>
  ))
  .add('Inaccessible', () => (
    <button style={{ backgroundColor: 'red', color: 'darkRed', }}>
      Inaccessible button
    </button>
  ));

Keywords

FAQs

Package last updated on 18 Jul 2017

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc