@storybook/addon-a11y

  • Version 10.2.13
  • Published
  • 184 kB
  • 2 dependencies
  • MIT license

Install

npm i @storybook/addon-a11y
yarn add @storybook/addon-a11y
pnpm add @storybook/addon-a11y

Overview

Storybook Addon A11y: Test UI component compliance with WCAG web accessibility standards

Index

Variables

variable PARAM_KEY

const PARAM_KEY: string;

    Functions

    function _default

    _default: () => storybook_internal_csf.PreviewAddon<A11yTypes>;

      Interfaces

      interface A11yGlobals

      interface A11yGlobals {}

        property a11y

        a11y?: {
        /**
        * Prevent the addon from executing automated accessibility checks upon visiting a story. You
        * can still trigger the checks from the addon panel.
        *
        * @see https://storybook.js.org/docs/writing-tests/accessibility-testing#disable-automated-checks
        */
        manual?: boolean;
        };
        • Accessibility configuration

          See Also

          • https://storybook.js.org/docs/writing-tests/accessibility-testing

        interface A11yParameters

        interface A11yParameters$1 {}

          property config

          config?: Spec;
          • Configuration object for axe-core.

            See Also

            • https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#api-name-axeconfigure

          property context

          context?: ContextSpecWithoutNode;
          • Context parameter for axe-core's run function, except without support for passing Nodes and NodeLists directly.

            See Also

            • https://github.com/dequelabs/axe-core/blob/develop/doc/context.md

          property disable

          disable?: boolean;
          • Whether to disable accessibility tests.

          property options

          options?: RunOptions;
          • Options for running axe-core.

            See Also

            • https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#options-parameter

          property test

          test?: A11yTest;
          • Defines how accessibility violations should be handled: 'off', 'todo', or 'error'.

          interface A11yTypes

          interface A11yTypes {}

            property globals

            globals: A11yGlobals;

              property parameters

              parameters: A11yParameters;

                Type Aliases

                type ContextObjectWithoutNode

                type ContextObjectWithoutNode =
                | {
                include: SelectorWithoutNode;
                exclude?: SelectorWithoutNode;
                }
                | {
                exclude: SelectorWithoutNode;
                include?: SelectorWithoutNode;
                };

                  type ContextSpecWithoutNode

                  type ContextSpecWithoutNode = SelectorWithoutNode | ContextObjectWithoutNode;

                    type SelectorWithoutNode

                    type SelectorWithoutNode = Omit<Selector, 'Node'> | Omit<SelectorList, 'NodeList'>;

                      Package Files (1)

                      Dependencies (2)

                      Dev Dependencies (9)

                      Peer Dependencies (1)

                      Badge

                      To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                      You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@storybook/addon-a11y.

                      • Markdown
                        [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@storybook/addon-a11y)
                      • HTML
                        <a href="https://www.jsdocs.io/package/@storybook/addon-a11y"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>