From 28447c935dd8d4d8ac750d4429c478377de64b07 Mon Sep 17 00:00:00 2001 From: mitchthorson Date: Thu, 30 Nov 2023 15:35:04 -0500 Subject: [PATCH] Add accessibility storybook addon --- .storybook/main.js | 3 ++- package-lock.json | 62 +++++++++++++++++++++++++++------------------- package.json | 1 + 3 files changed, 40 insertions(+), 26 deletions(-) diff --git a/.storybook/main.js b/.storybook/main.js index 1c2ae299..aa056712 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -5,7 +5,8 @@ const config = { "@storybook/addon-links", "@storybook/addon-essentials", "@storybook/addon-interactions", - "@storybook/addon-svelte-csf" + "@storybook/addon-svelte-csf", + "@storybook/addon-a11y" ], framework: { name: "@storybook/sveltekit", diff --git a/package-lock.json b/package-lock.json index 7d9d89b0..ee3fe286 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "layercake": "^8.0.0" }, "devDependencies": { + "@storybook/addon-a11y": "^7.6.2", "@storybook/addon-essentials": "^7.6.1", "@storybook/addon-interactions": "^7.6.1", "@storybook/addon-links": "^7.6.1", @@ -21,7 +22,6 @@ "@storybook/sveltekit": "^7.6.1", "@storybook/test": "^7.6.1", "@storybook/test-runner": "^0.16.0", - "@storybook/testing-library": "^0.2.2", "@storybook/theming": "^7.6.1", "@sveltejs/adapter-auto": "^2.0.0", "@sveltejs/kit": "^1.20.4", @@ -4194,6 +4194,33 @@ "@sinonjs/commons": "^3.0.0" } }, + "node_modules/@storybook/addon-a11y": { + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/@storybook/addon-a11y/-/addon-a11y-7.6.2.tgz", + "integrity": "sha512-fZlm7nlA/u2cgOglkVmUq0YIdd/azR6L/5hIXh/NMGH06D7sWeSIJEr3Hsq/V5AHEiOhy26xl3SB7X9CkjSAVw==", + "dev": true, + "dependencies": { + "@storybook/addon-highlight": "7.6.2", + "axe-core": "^4.2.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + } + }, + "node_modules/@storybook/addon-a11y/node_modules/@storybook/addon-highlight": { + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/@storybook/addon-highlight/-/addon-highlight-7.6.2.tgz", + "integrity": "sha512-HjV/DPUaBtH4HWc2zeZE3Oo8qQ7IWscpsYSa2NvflaMSHw3qaskfBLq60QVvodCvxlxaoQe3GfXx+eNg4mvaBw==", + "dev": true, + "dependencies": { + "@storybook/global": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/storybook" + } + }, "node_modules/@storybook/addon-actions": { "version": "7.6.1", "resolved": "https://registry.npmjs.org/@storybook/addon-actions/-/addon-actions-7.6.1.tgz", @@ -5319,30 +5346,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/@storybook/testing-library": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@storybook/testing-library/-/testing-library-0.2.2.tgz", - "integrity": "sha512-L8sXFJUHmrlyU2BsWWZGuAjv39Jl1uAqUHdxmN42JY15M4+XCMjGlArdCCjDe1wpTSW6USYISA9axjZojgtvnw==", - "dev": true, - "dependencies": { - "@testing-library/dom": "^9.0.0", - "@testing-library/user-event": "^14.4.0", - "ts-dedent": "^2.2.0" - } - }, - "node_modules/@storybook/testing-library/node_modules/@testing-library/user-event": { - "version": "14.5.1", - "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-14.5.1.tgz", - "integrity": "sha512-UCcUKrUYGj7ClomOo2SpNVvx4/fkd/2BbIHDCle8A0ax+P3bU7yJwDBDrS6ZwdTMARWTGODX1hEsCcO+7beJjg==", - "dev": true, - "engines": { - "node": ">=12", - "npm": ">=6" - }, - "peerDependencies": { - "@testing-library/dom": ">=7.21.4" - } - }, "node_modules/@storybook/theming": { "version": "7.6.1", "resolved": "https://registry.npmjs.org/@storybook/theming/-/theming-7.6.1.tgz", @@ -6607,6 +6610,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/axe-core": { + "version": "4.8.2", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.8.2.tgz", + "integrity": "sha512-/dlp0fxyM3R8YW7MFzaHWXrf4zzbr0vaYb23VBFCl83R7nWNPg/yaQw2Dc8jzCMmDVLhSdzH8MjrsuIUuvX+6g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/axios": { "version": "1.6.2", "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.2.tgz", diff --git a/package.json b/package.json index 1deaaa20..849057b9 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "svelte": "^4.0.0" }, "devDependencies": { + "@storybook/addon-a11y": "^7.6.2", "@storybook/addon-essentials": "^7.6.1", "@storybook/addon-interactions": "^7.6.1", "@storybook/addon-links": "^7.6.1",