From 2b12a15e22ecd8d7313d5827afd03aab08764b32 Mon Sep 17 00:00:00 2001 From: Dave Cross Date: Fri, 31 Jan 2020 16:29:02 -0700 Subject: [PATCH] Change all examples to use addon-a11y preset. --- examples/angular-cli/.storybook/main.js | 2 +- examples/angular-cli/.storybook/preview.ts | 2 -- examples/cra-kitchen-sink/.storybook/main.js | 2 +- examples/cra-kitchen-sink/.storybook/preview.js | 2 -- examples/cra-ts-kitchen-sink/.storybook/main.js | 2 +- examples/cra-ts-kitchen-sink/.storybook/preview.ts | 2 -- examples/ember-cli/.storybook/main.js | 2 +- examples/ember-cli/.storybook/preview.js | 2 -- examples/html-kitchen-sink/.storybook/main.js | 2 +- examples/html-kitchen-sink/.storybook/preview.js | 3 --- examples/html-kitchen-sink/stories/addon-a11y.stories.js | 2 -- examples/marko-cli/.storybook/main.js | 2 +- examples/marko-cli/.storybook/preview.js | 4 ---- examples/mithril-kitchen-sink/.storybook/main.js | 2 +- examples/mithril-kitchen-sink/.storybook/preview.js | 4 ---- examples/official-storybook/main.js | 2 +- examples/official-storybook/preview.js | 2 -- examples/preact-kitchen-sink/.storybook/main.js | 2 +- examples/preact-kitchen-sink/.storybook/preview.js | 5 ----- examples/rax-kitchen-sink/.storybook/main.js | 2 +- examples/rax-kitchen-sink/src/stories/addon-a11y.stories.js | 2 -- examples/riot-kitchen-sink/.storybook/main.js | 2 +- examples/riot-kitchen-sink/.storybook/preview.js | 4 ---- examples/svelte-kitchen-sink/.storybook/main.js | 2 +- examples/svelte-kitchen-sink/.storybook/preview.js | 4 ---- examples/vue-kitchen-sink/.storybook/main.js | 2 +- examples/vue-kitchen-sink/.storybook/preview.js | 2 -- examples/web-components-kitchen-sink/.storybook/main.js | 2 +- examples/web-components-kitchen-sink/.storybook/preview.js | 3 --- .../stories/addon-a11y.stories.js | 2 -- 30 files changed, 14 insertions(+), 59 deletions(-) delete mode 100644 examples/marko-cli/.storybook/preview.js delete mode 100644 examples/mithril-kitchen-sink/.storybook/preview.js delete mode 100644 examples/preact-kitchen-sink/.storybook/preview.js delete mode 100644 examples/riot-kitchen-sink/.storybook/preview.js delete mode 100644 examples/svelte-kitchen-sink/.storybook/preview.js diff --git a/examples/angular-cli/.storybook/main.js b/examples/angular-cli/.storybook/main.js index e0a151381438..588a0f7c76d2 100644 --- a/examples/angular-cli/.storybook/main.js +++ b/examples/angular-cli/.storybook/main.js @@ -10,6 +10,6 @@ module.exports = { '@storybook/addon-options', '@storybook/addon-jest', '@storybook/addon-backgrounds', - '@storybook/addon-a11y', + '@storybook/addon-a11y/preset', ], }; diff --git a/examples/angular-cli/.storybook/preview.ts b/examples/angular-cli/.storybook/preview.ts index 4e526489c8ce..e2c77e9e4870 100644 --- a/examples/angular-cli/.storybook/preview.ts +++ b/examples/angular-cli/.storybook/preview.ts @@ -1,5 +1,4 @@ import { addParameters, addDecorator } from '@storybook/angular'; -import { withA11y } from '@storybook/addon-a11y'; import { setCompodocJson } from '@storybook/addon-docs/angular'; import addCssWarning from '../src/cssWarning'; @@ -9,7 +8,6 @@ import docJson from '../documentation.json'; setCompodocJson(docJson); -addDecorator(withA11y); addCssWarning(); addParameters({ diff --git a/examples/cra-kitchen-sink/.storybook/main.js b/examples/cra-kitchen-sink/.storybook/main.js index 3cb41fc807f7..654ee9af23e1 100644 --- a/examples/cra-kitchen-sink/.storybook/main.js +++ b/examples/cra-kitchen-sink/.storybook/main.js @@ -14,7 +14,7 @@ module.exports = { '@storybook/addon-options', '@storybook/addon-knobs', '@storybook/addon-backgrounds', - '@storybook/addon-a11y', + '@storybook/addon-a11y/preset', '@storybook/addon-jest', ], stories: ['../src/stories/**/*.stories.(js|mdx)'], diff --git a/examples/cra-kitchen-sink/.storybook/preview.js b/examples/cra-kitchen-sink/.storybook/preview.js index 6f9c8caefc7f..50a6b6acc28e 100644 --- a/examples/cra-kitchen-sink/.storybook/preview.js +++ b/examples/cra-kitchen-sink/.storybook/preview.js @@ -1,7 +1,5 @@ import { addParameters, addDecorator } from '@storybook/react'; -import { withA11y } from '@storybook/addon-a11y'; -addDecorator(withA11y); addParameters({ options: { storySort: (a, b) => diff --git a/examples/cra-ts-kitchen-sink/.storybook/main.js b/examples/cra-ts-kitchen-sink/.storybook/main.js index 04b6bba21210..d98f9882e400 100644 --- a/examples/cra-ts-kitchen-sink/.storybook/main.js +++ b/examples/cra-ts-kitchen-sink/.storybook/main.js @@ -23,6 +23,6 @@ module.exports = { '@storybook/addon-docs', '@storybook/addon-actions', '@storybook/addon-links', - '@storybook/addon-a11y', + '@storybook/addon-a11y/preset', ], }; diff --git a/examples/cra-ts-kitchen-sink/.storybook/preview.ts b/examples/cra-ts-kitchen-sink/.storybook/preview.ts index ec21c3337ee9..4ae2fd71cc3e 100644 --- a/examples/cra-ts-kitchen-sink/.storybook/preview.ts +++ b/examples/cra-ts-kitchen-sink/.storybook/preview.ts @@ -1,9 +1,7 @@ import { addParameters, addDecorator } from '@storybook/react'; -import { withA11y } from '@storybook/addon-a11y'; import { withKnobs } from '@storybook/addon-knobs'; addDecorator(withKnobs); -addDecorator(withA11y); addParameters({ options: { brandTitle: 'CRA TypeScript Kitchen Sink', diff --git a/examples/ember-cli/.storybook/main.js b/examples/ember-cli/.storybook/main.js index f57119476336..9d2f153a529d 100644 --- a/examples/ember-cli/.storybook/main.js +++ b/examples/ember-cli/.storybook/main.js @@ -2,7 +2,7 @@ const path = require('path'); module.exports = { addons: [ - '@storybook/addon-a11y', + '@storybook/addon-a11y/preset', '@storybook/addon-storysource', '@storybook/addon-actions', '@storybook/addon-docs', diff --git a/examples/ember-cli/.storybook/preview.js b/examples/ember-cli/.storybook/preview.js index 0bf5e7f8dcfc..9bef60f26a28 100644 --- a/examples/ember-cli/.storybook/preview.js +++ b/examples/ember-cli/.storybook/preview.js @@ -1,11 +1,9 @@ import { addParameters, addDecorator } from '@storybook/ember'; import { setJSONDoc } from '@storybook/addon-docs/ember'; -import { withA11y } from '@storybook/addon-a11y'; // eslint-disable-next-line import/no-unresolved import docJson from '../ember-output/storybook-docgen/index.json'; setJSONDoc(docJson); -addDecorator(withA11y); addParameters({ options: { showRoots: true, diff --git a/examples/html-kitchen-sink/.storybook/main.js b/examples/html-kitchen-sink/.storybook/main.js index 66ab602a73cd..85c419f21014 100644 --- a/examples/html-kitchen-sink/.storybook/main.js +++ b/examples/html-kitchen-sink/.storybook/main.js @@ -3,7 +3,7 @@ module.exports = { stories: [`${__dirname}/../stories/*.stories.*`], addons: [ '@storybook/addon-docs', - '@storybook/addon-a11y', + '@storybook/addon-a11y/preset', '@storybook/addon-actions', '@storybook/addon-backgrounds', '@storybook/addon-events', diff --git a/examples/html-kitchen-sink/.storybook/preview.js b/examples/html-kitchen-sink/.storybook/preview.js index 60851dbe04b4..b5777595e16f 100644 --- a/examples/html-kitchen-sink/.storybook/preview.js +++ b/examples/html-kitchen-sink/.storybook/preview.js @@ -1,7 +1,4 @@ import { addParameters, addDecorator } from '@storybook/html'; -import { withA11y } from '@storybook/addon-a11y'; - -addDecorator(withA11y); addParameters({ a11y: { diff --git a/examples/html-kitchen-sink/stories/addon-a11y.stories.js b/examples/html-kitchen-sink/stories/addon-a11y.stories.js index a811c0cee73f..2e28d26daf7b 100644 --- a/examples/html-kitchen-sink/stories/addon-a11y.stories.js +++ b/examples/html-kitchen-sink/stories/addon-a11y.stories.js @@ -1,11 +1,9 @@ import { document, setTimeout } from 'global'; -import { withA11y } from '@storybook/addon-a11y'; const text = 'Testing the a11y addon'; export default { title: 'Addons/a11y', - decorators: [withA11y], parameters: { options: { selectedPanel: 'storybook/a11y/panel' }, }, diff --git a/examples/marko-cli/.storybook/main.js b/examples/marko-cli/.storybook/main.js index 1428a4981607..d3da06752e8e 100644 --- a/examples/marko-cli/.storybook/main.js +++ b/examples/marko-cli/.storybook/main.js @@ -7,7 +7,7 @@ module.exports = { '@storybook/addon-actions', '@storybook/addon-knobs', '@storybook/addon-options', - '@storybook/addon-a11y', + '@storybook/addon-a11y/preset', ], webpackFinal: async config => { config.module.rules.push({ diff --git a/examples/marko-cli/.storybook/preview.js b/examples/marko-cli/.storybook/preview.js deleted file mode 100644 index 673c37b1bf3c..000000000000 --- a/examples/marko-cli/.storybook/preview.js +++ /dev/null @@ -1,4 +0,0 @@ -import { addDecorator } from '@storybook/marko'; -import { withA11y } from '@storybook/addon-a11y'; - -addDecorator(withA11y); diff --git a/examples/mithril-kitchen-sink/.storybook/main.js b/examples/mithril-kitchen-sink/.storybook/main.js index 3a53130947d7..aa7ca1a2a628 100644 --- a/examples/mithril-kitchen-sink/.storybook/main.js +++ b/examples/mithril-kitchen-sink/.storybook/main.js @@ -11,7 +11,7 @@ module.exports = { '@storybook/addon-viewport', '@storybook/addon-options', '@storybook/addon-backgrounds', - '@storybook/addon-a11y', + '@storybook/addon-a11y/preset', ], webpackFinal: async config => { config.module.rules.push({ diff --git a/examples/mithril-kitchen-sink/.storybook/preview.js b/examples/mithril-kitchen-sink/.storybook/preview.js deleted file mode 100644 index aaa551ea87eb..000000000000 --- a/examples/mithril-kitchen-sink/.storybook/preview.js +++ /dev/null @@ -1,4 +0,0 @@ -import { addDecorator } from '@storybook/mithril'; -import { withA11y } from '@storybook/addon-a11y'; - -addDecorator(withA11y); diff --git a/examples/official-storybook/main.js b/examples/official-storybook/main.js index cd5ac9d75050..b13fd107ad31 100644 --- a/examples/official-storybook/main.js +++ b/examples/official-storybook/main.js @@ -17,7 +17,7 @@ module.exports = { '@storybook/addon-knobs', '@storybook/addon-cssresources', '@storybook/addon-backgrounds', - '@storybook/addon-a11y', + '@storybook/addon-a11y/preset', '@storybook/addon-jest', '@storybook/addon-viewport', '@storybook/addon-graphql', diff --git a/examples/official-storybook/preview.js b/examples/official-storybook/preview.js index c8ef59f5683d..ae95247d1282 100644 --- a/examples/official-storybook/preview.js +++ b/examples/official-storybook/preview.js @@ -2,7 +2,6 @@ import React from 'react'; import { addDecorator, addParameters } from '@storybook/react'; import { Global, ThemeProvider, themes, createReset, convert } from '@storybook/theming'; import { withCssResources } from '@storybook/addon-cssresources'; -import { withA11y } from '@storybook/addon-a11y'; import { withNotes } from '@storybook/addon-notes'; import { DocsPage } from '@storybook/addon-docs/blocks'; @@ -26,7 +25,6 @@ addHeadWarning('preview-head-not-loaded', 'Preview head not loaded'); addHeadWarning('dotenv-file-not-loaded', 'Dotenv file not loaded'); addDecorator(withCssResources); -addDecorator(withA11y); addDecorator(withNotes); addDecorator(storyFn => ( diff --git a/examples/preact-kitchen-sink/.storybook/main.js b/examples/preact-kitchen-sink/.storybook/main.js index 6f83f3c3e6ce..049944cbbb32 100644 --- a/examples/preact-kitchen-sink/.storybook/main.js +++ b/examples/preact-kitchen-sink/.storybook/main.js @@ -12,7 +12,7 @@ module.exports = { '@storybook/addon-options', '@storybook/addon-backgrounds', '@storybook/addon-contexts', - '@storybook/addon-a11y', + '@storybook/addon-a11y/preset', ], webpackFinal: config => { config.module.rules.push({ diff --git a/examples/preact-kitchen-sink/.storybook/preview.js b/examples/preact-kitchen-sink/.storybook/preview.js deleted file mode 100644 index 9f10bed13266..000000000000 --- a/examples/preact-kitchen-sink/.storybook/preview.js +++ /dev/null @@ -1,5 +0,0 @@ -/** @jsx h */ -import { addDecorator } from '@storybook/preact'; -import { withA11y } from '@storybook/addon-a11y'; - -addDecorator(withA11y); diff --git a/examples/rax-kitchen-sink/.storybook/main.js b/examples/rax-kitchen-sink/.storybook/main.js index 08801da7c620..b49f799835ad 100644 --- a/examples/rax-kitchen-sink/.storybook/main.js +++ b/examples/rax-kitchen-sink/.storybook/main.js @@ -11,7 +11,7 @@ module.exports = { '@storybook/addon-options', '@storybook/addon-knobs', '@storybook/addon-backgrounds', - '@storybook/addon-a11y', + '@storybook/addon-a11y/preset', '@storybook/addon-jest', ], webpackFinal: async config => ({ diff --git a/examples/rax-kitchen-sink/src/stories/addon-a11y.stories.js b/examples/rax-kitchen-sink/src/stories/addon-a11y.stories.js index 49b953eff4f1..ff190764a186 100644 --- a/examples/rax-kitchen-sink/src/stories/addon-a11y.stories.js +++ b/examples/rax-kitchen-sink/src/stories/addon-a11y.stories.js @@ -1,12 +1,10 @@ import { createElement } from 'rax'; -import { withA11Y } from '@storybook/addon-a11y'; import Text from 'rax-text'; import View from 'rax-view'; import markdown from './note.md'; export default { title: 'Addon/addon-a11y', - decorators: [withA11Y], }; export const Basic = () => RAX TEXT NODE; diff --git a/examples/riot-kitchen-sink/.storybook/main.js b/examples/riot-kitchen-sink/.storybook/main.js index 20617194dd99..2e050b9fe3be 100644 --- a/examples/riot-kitchen-sink/.storybook/main.js +++ b/examples/riot-kitchen-sink/.storybook/main.js @@ -11,7 +11,7 @@ module.exports = { '@storybook/addon-viewport', '@storybook/addon-options', '@storybook/addon-backgrounds', - '@storybook/addon-a11y', + '@storybook/addon-a11y/preset', ], webpackFinal: async config => { config.module.rules.push({ diff --git a/examples/riot-kitchen-sink/.storybook/preview.js b/examples/riot-kitchen-sink/.storybook/preview.js deleted file mode 100644 index e74334d439c3..000000000000 --- a/examples/riot-kitchen-sink/.storybook/preview.js +++ /dev/null @@ -1,4 +0,0 @@ -import { addDecorator } from '@storybook/riot'; -import { withA11y } from '@storybook/addon-a11y'; - -addDecorator(withA11y); diff --git a/examples/svelte-kitchen-sink/.storybook/main.js b/examples/svelte-kitchen-sink/.storybook/main.js index 05e4ce3f0c53..4cb26ffceccc 100644 --- a/examples/svelte-kitchen-sink/.storybook/main.js +++ b/examples/svelte-kitchen-sink/.storybook/main.js @@ -11,7 +11,7 @@ module.exports = { '@storybook/addon-backgrounds', '@storybook/addon-viewport', '@storybook/addon-options', - '@storybook/addon-a11y', + '@storybook/addon-a11y/preset', ], webpackFinal: async config => { config.module.rules.push({ diff --git a/examples/svelte-kitchen-sink/.storybook/preview.js b/examples/svelte-kitchen-sink/.storybook/preview.js deleted file mode 100644 index 7f5d4bed2e58..000000000000 --- a/examples/svelte-kitchen-sink/.storybook/preview.js +++ /dev/null @@ -1,4 +0,0 @@ -import { addDecorator } from '@storybook/svelte'; -import { withA11y } from '@storybook/addon-a11y'; - -addDecorator(withA11y); diff --git a/examples/vue-kitchen-sink/.storybook/main.js b/examples/vue-kitchen-sink/.storybook/main.js index 1b0c3c5a231c..49f7f1c5f4c9 100644 --- a/examples/vue-kitchen-sink/.storybook/main.js +++ b/examples/vue-kitchen-sink/.storybook/main.js @@ -10,7 +10,7 @@ module.exports = { '@storybook/addon-viewport', '@storybook/addon-options', '@storybook/addon-backgrounds', - '@storybook/addon-a11y', + '@storybook/addon-a11y/preset', '@storybook/addon-contexts', ], }; diff --git a/examples/vue-kitchen-sink/.storybook/preview.js b/examples/vue-kitchen-sink/.storybook/preview.js index 6b56e714e63d..322b5cc5273f 100644 --- a/examples/vue-kitchen-sink/.storybook/preview.js +++ b/examples/vue-kitchen-sink/.storybook/preview.js @@ -1,11 +1,9 @@ import { addParameters, addDecorator } from '@storybook/vue'; import Vue from 'vue'; import Vuex from 'vuex'; -import { withA11y } from '@storybook/addon-a11y'; import MyButton from '../src/stories/Button.vue'; -addDecorator(withA11y); Vue.component('my-button', MyButton); Vue.use(Vuex); diff --git a/examples/web-components-kitchen-sink/.storybook/main.js b/examples/web-components-kitchen-sink/.storybook/main.js index 846908eefcc3..7239763d1552 100644 --- a/examples/web-components-kitchen-sink/.storybook/main.js +++ b/examples/web-components-kitchen-sink/.storybook/main.js @@ -1,7 +1,7 @@ module.exports = { addons: [ '@storybook/addon-docs', - '@storybook/addon-a11y', + '@storybook/addon-a11y/preset', '@storybook/addon-actions', '@storybook/addon-backgrounds', '@storybook/addon-knobs', diff --git a/examples/web-components-kitchen-sink/.storybook/preview.js b/examples/web-components-kitchen-sink/.storybook/preview.js index 5fbd341a802c..39953f357907 100644 --- a/examples/web-components-kitchen-sink/.storybook/preview.js +++ b/examples/web-components-kitchen-sink/.storybook/preview.js @@ -6,14 +6,11 @@ import { addDecorator, setCustomElements, } from '@storybook/web-components'; -import { withA11y } from '@storybook/addon-a11y'; import customElements from '../custom-elements.json'; setCustomElements(customElements); -addDecorator(withA11y); - addParameters({ a11y: { config: {}, diff --git a/examples/web-components-kitchen-sink/stories/addon-a11y.stories.js b/examples/web-components-kitchen-sink/stories/addon-a11y.stories.js index ebbacd65298f..0402fc89a7eb 100644 --- a/examples/web-components-kitchen-sink/stories/addon-a11y.stories.js +++ b/examples/web-components-kitchen-sink/stories/addon-a11y.stories.js @@ -1,12 +1,10 @@ import { document, setTimeout } from 'global'; -import { withA11y } from '@storybook/addon-a11y'; import { html } from 'lit-html'; const text = 'Testing the a11y addon'; export default { title: 'Addons/a11y', - decorators: [withA11y], parameters: { options: { selectedPanel: 'storybook/a11y/panel' }, },