storybook/docs/snippets/web-components/storybook-addon-a11y-story-config.js.mdx
2023-01-05 14:53:03 +00:00

33 lines
715 B
Plaintext

```js
// MyComponent.stories.js
export default {
title: 'Configure a11y addon',
component: 'my-component',
};
export const ExampleStory = {
parameters: {
a11y: {
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,
},
],
},
options: {},
manual: true,
},
},
};
```