storybook/docs/snippets/vue/storybook-addon-a11y-disable.ts.mdx
2023-01-06 19:15:31 +00:00

39 lines
1017 B
Plaintext

```ts
// MyComponent.stories.ts
// Replace with '@storybook/vue3' if you're working with Vue3 projects
import type { Meta, StoryObj } from '@storybook/vue';
import MyComponent from './MyComponent.vue';
const meta: Meta<typeof MyComponent> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/7.0/vue/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Disable a11y addon',
component: MyComponent,
};
export default meta;
type Story = StoryObj<typeof MyComponent>;
/*
*👇 Render functions are a framework specific feature to allow you control on how the component renders.
* See https://storybook.js.org/docs/7.0/vue/api/csf
* to learn how to use render functions.
*/
export const NonA11yStory: Story = {
render: () => ({
components: { MyComponent },
template: '<MyComponent/>',
}),
parameters: {
a11y: {
// This option disables all a11y checks on this story
disable: true,
},
},
};
```