Added a11y Storybook addon. (#8814)
This commit is contained in:
parent
7fa3068e70
commit
52ac36dd0a
4 changed files with 57 additions and 2 deletions
|
|
@ -6,6 +6,7 @@ module.exports = {
|
|||
'@storybook/addon-knobs',
|
||||
'@storybook/addon-actions',
|
||||
'@storybook/addon-links',
|
||||
'@storybook/addon-a11y/register',
|
||||
],
|
||||
webpackFinal: async (config, { configType }) => {
|
||||
config.module.rules.push({
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import { h } from 'preact';
|
||||
import { addDecorator, addParameters } from '@storybook/preact';
|
||||
import { withA11y } from '@storybook/addon-a11y';
|
||||
|
||||
import '../../assets/stylesheets/minimal.scss';
|
||||
import '../../assets/stylesheets/crayons.scss';
|
||||
|
|
@ -50,6 +51,7 @@ const themeSwitcherDecorator = (storyFn) => (
|
|||
);
|
||||
|
||||
addDecorator(themeSwitcherDecorator);
|
||||
addDecorator(withA11y);
|
||||
|
||||
addParameters({
|
||||
options: {
|
||||
|
|
|
|||
|
|
@ -82,6 +82,7 @@
|
|||
"devDependencies": {
|
||||
"@percy/agent": "^0.26.9",
|
||||
"@stoplight/spectral": "5.4.0",
|
||||
"@storybook/addon-a11y": "^5.3.19",
|
||||
"@storybook/addon-actions": "^5.3.19",
|
||||
"@storybook/addon-knobs": "^5.3.19",
|
||||
"@storybook/addon-links": "^5.3.19",
|
||||
|
|
|
|||
55
yarn.lock
55
yarn.lock
|
|
@ -1611,6 +1611,28 @@
|
|||
"@stoplight/yaml-ast-parser" "0.0.44"
|
||||
lodash "^4.17.15"
|
||||
|
||||
"@storybook/addon-a11y@^5.3.19":
|
||||
version "5.3.19"
|
||||
resolved "https://registry.yarnpkg.com/@storybook/addon-a11y/-/addon-a11y-5.3.19.tgz#6a21d200c1e67362ae3680d3beb76bfb4ff6c508"
|
||||
integrity sha512-obh2Uy8IeXU+UPQXoqT2Q0hRdAuQdfZjYdrGJ9RGoehVEzMxZlR0x1Cml5xf3u9v6+l72hi85RvA6YEGl+jKZw==
|
||||
dependencies:
|
||||
"@storybook/addons" "5.3.19"
|
||||
"@storybook/api" "5.3.19"
|
||||
"@storybook/client-logger" "5.3.19"
|
||||
"@storybook/components" "5.3.19"
|
||||
"@storybook/core-events" "5.3.19"
|
||||
"@storybook/theming" "5.3.19"
|
||||
axe-core "^3.3.2"
|
||||
core-js "^3.0.1"
|
||||
global "^4.3.2"
|
||||
memoizerific "^1.11.3"
|
||||
react "^16.8.3"
|
||||
react-redux "^7.0.2"
|
||||
react-sizeme "^2.5.2"
|
||||
redux "^4.0.1"
|
||||
ts-dedent "^1.1.0"
|
||||
util-deprecate "^1.0.2"
|
||||
|
||||
"@storybook/addon-actions@^5.3.19":
|
||||
version "5.3.19"
|
||||
resolved "https://registry.yarnpkg.com/@storybook/addon-actions/-/addon-actions-5.3.19.tgz#50548fa6e84bc79ad95233ce23ade4878fc7cfac"
|
||||
|
|
@ -2979,6 +3001,11 @@ aws4@^1.8.0:
|
|||
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.10.0.tgz#a17b3a8ea811060e74d47d306122400ad4497ae2"
|
||||
integrity sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA==
|
||||
|
||||
axe-core@^3.3.2:
|
||||
version "3.5.5"
|
||||
resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-3.5.5.tgz#84315073b53fa3c0c51676c588d59da09a192227"
|
||||
integrity sha512-5P0QZ6J5xGikH780pghEdbEKijCTrruK9KxtPZCFWUpef0f6GipO+xEZ5GKCb020mmqgbiNO6TcA55CriL784Q==
|
||||
|
||||
axe-core@^3.5.1:
|
||||
version "3.5.4"
|
||||
resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-3.5.4.tgz#5a7b49ba8c989cd59cde219810ccfb0b7cf72e97"
|
||||
|
|
@ -12005,7 +12032,7 @@ react-inspector@^4.0.0:
|
|||
is-dom "^1.0.9"
|
||||
prop-types "^15.6.1"
|
||||
|
||||
react-is@^16.12.0, react-is@^16.6.0, react-is@^16.7.0, react-is@^16.8.1, react-is@^16.8.4:
|
||||
react-is@^16.12.0, react-is@^16.6.0, react-is@^16.7.0, react-is@^16.8.1, react-is@^16.8.4, react-is@^16.9.0:
|
||||
version "16.13.1"
|
||||
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
|
||||
integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==
|
||||
|
|
@ -12036,6 +12063,17 @@ react-popper@^1.3.7:
|
|||
typed-styles "^0.0.7"
|
||||
warning "^4.0.2"
|
||||
|
||||
react-redux@^7.0.2:
|
||||
version "7.2.0"
|
||||
resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-7.2.0.tgz#f970f62192b3981642fec46fd0db18a074fe879d"
|
||||
integrity sha512-EvCAZYGfOLqwV7gh849xy9/pt55rJXPwmYvI4lilPM5rUT/1NxuuN59ipdBksRVSvz0KInbPnp4IfoXJXCqiDA==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.5.5"
|
||||
hoist-non-react-statics "^3.3.0"
|
||||
loose-envify "^1.4.0"
|
||||
prop-types "^15.7.2"
|
||||
react-is "^16.9.0"
|
||||
|
||||
react-select@^3.0.8:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/react-select/-/react-select-3.1.0.tgz#ab098720b2e9fe275047c993f0d0caf5ded17c27"
|
||||
|
|
@ -12050,7 +12088,7 @@ react-select@^3.0.8:
|
|||
react-input-autosize "^2.2.2"
|
||||
react-transition-group "^4.3.0"
|
||||
|
||||
react-sizeme@^2.6.7:
|
||||
react-sizeme@^2.5.2, react-sizeme@^2.6.7:
|
||||
version "2.6.12"
|
||||
resolved "https://registry.yarnpkg.com/react-sizeme/-/react-sizeme-2.6.12.tgz#ed207be5476f4a85bf364e92042520499455453e"
|
||||
integrity sha512-tL4sCgfmvapYRZ1FO2VmBmjPVzzqgHA7kI8lSJ6JS6L78jXFNRdOZFpXyK6P1NBZvKPPCZxReNgzZNUajAerZw==
|
||||
|
|
@ -12306,6 +12344,14 @@ redoc@2.0.0-rc.29:
|
|||
tslib "^1.11.1"
|
||||
url-template "^2.0.8"
|
||||
|
||||
redux@^4.0.1:
|
||||
version "4.0.5"
|
||||
resolved "https://registry.yarnpkg.com/redux/-/redux-4.0.5.tgz#4db5de5816e17891de8a80c424232d06f051d93f"
|
||||
integrity sha512-VSz1uMAH24DM6MF72vcojpYPtrTUu3ByVWfPL1nPfVRb5mZVTve5GnNCUV53QM/BZ66xfWrm0CTWoM+Xlz8V1w==
|
||||
dependencies:
|
||||
loose-envify "^1.4.0"
|
||||
symbol-observable "^1.2.0"
|
||||
|
||||
refractor@^2.4.1:
|
||||
version "2.10.1"
|
||||
resolved "https://registry.yarnpkg.com/refractor/-/refractor-2.10.1.tgz#166c32f114ed16fd96190ad21d5193d3afc7d34e"
|
||||
|
|
@ -13832,6 +13878,11 @@ swagger2openapi@^5.3.4:
|
|||
yaml "^1.8.3"
|
||||
yargs "^12.0.5"
|
||||
|
||||
symbol-observable@^1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804"
|
||||
integrity sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==
|
||||
|
||||
symbol-tree@^3.2.4:
|
||||
version "3.2.4"
|
||||
resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue