From 135b000b226a7862e94b579803aceb05fd2d90f9 Mon Sep 17 00:00:00 2001 From: Troy Chaplin Date: Sun, 25 Feb 2024 15:31:28 -0500 Subject: [PATCH] add: a11y to storybook --- .storybook/main.ts | 1 + package-lock.json | 24 ++++++++++++++++++++++++ package.json | 1 + 3 files changed, 26 insertions(+) diff --git a/.storybook/main.ts b/.storybook/main.ts index 94e43a1..4f67b56 100644 --- a/.storybook/main.ts +++ b/.storybook/main.ts @@ -3,6 +3,7 @@ import type { StorybookConfig } from '@storybook/react-vite' const config: StorybookConfig = { stories: ['../lib/**/*.mdx', '../lib/**/*.stories.@(js|jsx|mjs|ts|tsx)'], addons: [ + '@storybook/addon-a11y', '@storybook/addon-links', '@storybook/addon-essentials', '@storybook/addon-onboarding', diff --git a/package-lock.json b/package-lock.json index 236dd14..9a3516a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,6 +16,7 @@ "@commitlint/cli": "^18.6.1", "@commitlint/config-conventional": "^18.6.2", "@size-limit/preset-big-lib": "^11.0.2", + "@storybook/addon-a11y": "^7.6.17", "@storybook/addon-essentials": "^7.6.17", "@storybook/addon-interactions": "^7.6.17", "@storybook/addon-links": "^7.6.17", @@ -4973,6 +4974,20 @@ "node": "^18 || >=20" } }, + "node_modules/@storybook/addon-a11y": { + "version": "7.6.17", + "resolved": "https://registry.npmjs.org/@storybook/addon-a11y/-/addon-a11y-7.6.17.tgz", + "integrity": "sha512-UYHJAKQpJMCu4X4O/325UqozYrkhPn2VyQdwPgC+uiOKZvrtni4uRbpOspeyjC0wXH1tDbY8WZvxwvwQryYkpA==", + "dev": true, + "dependencies": { + "@storybook/addon-highlight": "7.6.17", + "axe-core": "^4.2.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + } + }, "node_modules/@storybook/addon-actions": { "version": "7.6.17", "resolved": "https://registry.npmjs.org/@storybook/addon-actions/-/addon-actions-7.6.17.tgz", @@ -8607,6 +8622,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/axe-core": { + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.8.4.tgz", + "integrity": "sha512-CZLSKisu/bhJ2awW4kJndluz2HLZYIHh5Uy1+ZwDRkJi69811xgIXXfdU9HSLX0Th+ILrHj8qfL/5wzamsFtQg==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/b4a": { "version": "1.6.6", "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.6.tgz", diff --git a/package.json b/package.json index d57fd0a..f77a7f2 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,7 @@ "@commitlint/cli": "^18.6.1", "@commitlint/config-conventional": "^18.6.2", "@size-limit/preset-big-lib": "^11.0.2", + "@storybook/addon-a11y": "^7.6.17", "@storybook/addon-essentials": "^7.6.17", "@storybook/addon-interactions": "^7.6.17", "@storybook/addon-links": "^7.6.17",