From e2fd8ec1821294413d0949f1cb37908562301bf4 Mon Sep 17 00:00:00 2001 From: Daniel Sil Date: Mon, 6 May 2024 11:42:54 +0200 Subject: [PATCH] chore: add accessibility addon to storybook --- packages/orbit-components/.storybook/main.ts | 2 ++ packages/orbit-components/package.json | 1 + yarn.lock | 20 ++++++++++++++++++++ 3 files changed, 23 insertions(+) diff --git a/packages/orbit-components/.storybook/main.ts b/packages/orbit-components/.storybook/main.ts index 6b8237e670..1fce7c58d2 100644 --- a/packages/orbit-components/.storybook/main.ts +++ b/packages/orbit-components/.storybook/main.ts @@ -8,6 +8,7 @@ const config: StorybookConfig = { framework: "@storybook/react-webpack5", addons: [ "@storybook/addon-knobs", + "@storybook/addon-a11y", "storybook-addon-pseudo-states", { name: "@storybook/addon-essentials", @@ -39,4 +40,5 @@ const config: StorybookConfig = { return undefined; }, }; + export default config; diff --git a/packages/orbit-components/package.json b/packages/orbit-components/package.json index bdd3c30b22..77834fc12b 100644 --- a/packages/orbit-components/package.json +++ b/packages/orbit-components/package.json @@ -90,6 +90,7 @@ "@nanostores/router": "^0.3.1", "@playwright/experimental-ct-react": "^1.39.0", "@size-limit/webpack-why": "^8.0.0", + "@storybook/addon-a11y": "^7.4.6", "@storybook/addon-essentials": "^7.0.23", "@storybook/addon-knobs": "^7.0.2", "@storybook/addon-styling": "^1.3.1", diff --git a/yarn.lock b/yarn.lock index 34fd062df3..dc0e6fb43a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4064,6 +4064,14 @@ dependencies: "@statoscope/types" "5.22.0" +"@storybook/addon-a11y@^7.4.6": + version "7.6.19" + resolved "https://registry.yarnpkg.com/@storybook/addon-a11y/-/addon-a11y-7.6.19.tgz#8b684edfb3a387d24398e81517dc734f0b76a1db" + integrity sha512-92SOapbXukkO0RlrA0+8qa61NlCGSUFM7n5DfAA6tobIfhBAhfsEi7I9Q/0F95SCAgJoVVQdeIGKdvHjxO8DAg== + dependencies: + "@storybook/addon-highlight" "7.6.19" + axe-core "^4.2.0" + "@storybook/addon-actions@7.1.1": version "7.1.1" resolved "https://registry.npmjs.org/@storybook/addon-actions/-/addon-actions-7.1.1.tgz" @@ -4173,6 +4181,13 @@ "@storybook/global" "^5.0.0" "@storybook/preview-api" "7.1.1" +"@storybook/addon-highlight@7.6.19": + version "7.6.19" + resolved "https://registry.yarnpkg.com/@storybook/addon-highlight/-/addon-highlight-7.6.19.tgz#7e88fe924e822426ef54c33ad1522a9676ef57aa" + integrity sha512-/pApl0oiVU1CQ8xETRNDLDthMBjeTmvFnTRq8RJ9m0JYTrSsoyHDmj9zS4K1k9gReqijE7brslhP8d2tblBpNw== + dependencies: + "@storybook/global" "^5.0.0" + "@storybook/addon-knobs@^7.0.2": version "7.0.2" resolved "https://registry.npmjs.org/@storybook/addon-knobs/-/addon-knobs-7.0.2.tgz" @@ -7178,6 +7193,11 @@ aws4@^1.8.0: resolved "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz" integrity sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg== +axe-core@^4.2.0: + version "4.9.0" + resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.9.0.tgz#b18971494551ab39d4ff5f7d4c6411bd20cc7c2a" + integrity sha512-H5orY+M2Fr56DWmMFpMrq5Ge93qjNdPVqzBv5gWK3aD1OvjBEJlEzxf09z93dGVQeI0LiW+aCMIx1QtShC/zUw== + axe-core@^4.6.2: version "4.7.2" resolved "https://registry.npmjs.org/axe-core/-/axe-core-4.7.2.tgz"