storybook/docs/snippets/common/storybook-addon-a11y-global-config.js.mdx
Norbert de Langen 36702ebe0c
I changed #root => #storybook-root
I changed #docs-root => #storybook-docs
2022-08-02 11:18:33 +02:00

28 lines
688 B
Plaintext

```js
// .storybook/preview.js
export const parameters = {
a11y: {
// Optional selector to inspect
element: '#storybook-root',
config: {
rules: [
{
// The autocomplete rule will not run based on the CSS selector provided
id: 'autocomplete-valid',
selector: '*:not([autocomplete="nope"])',
},
{
// Setting the enabled option to false will disable checks for this particular rule on all stories.
id: 'image-alt',
enabled: false,
},
],
},
// Axe's options parameter
options: {},
// Optional flag to prevent the automatic check
manual: true,
},
};
```