Skip to content

Commit

Permalink
docs: Added/activated a11y addon to storybook (#4265)
Browse files Browse the repository at this point in the history
* added a11y addon to storybook

* Create popular-files-destroy.md
  • Loading branch information
aromko authored Oct 30, 2024
1 parent 80a9f5b commit 3e09fce
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/popular-files-destroy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@marigold/storybook-config": patch
---

docs: Added/activated a11y addon to storybook. In all components is now a panel called Accessibility which shows how accessible our components are and if there are some violations or incomplete issues.
1 change: 1 addition & 0 deletions config/storybook/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const config: StorybookConfig = {
getAbsolutePath('@storybook/addon-interactions'),
getAbsolutePath('@storybook/addon-themes'),
getAbsolutePath('@storybook/addon-storysource'),
getAbsolutePath('@storybook/addon-a11y'),
],
framework: {
name: getAbsolutePath('@storybook/react-vite'),
Expand Down
4 changes: 3 additions & 1 deletion config/storybook/.storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import '@marigold/theme-b2b/styles.css';
import core from '@marigold/theme-core';
import '@marigold/theme-core/styles.css';

// Helpers

// Helpers
// ---------------
const THEME = {
Expand All @@ -26,7 +28,7 @@ type ThemeNames = keyof typeof THEME;
export const parameters: Preview['parameters'] = {
layout: 'fullscreen',
a11y: {
element: '#root',
element: '#storybook-root',
},
options: {
storySort: {
Expand Down
2 changes: 1 addition & 1 deletion config/storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@marigold/theme-b2b": "workspace:*",
"@marigold/theme-core": "workspace:*",
"@mdx-js/react": "3.0.1",
"@storybook/addon-a11y": "^8.1.11",
"@storybook/addon-a11y": "^8.2.9",
"@storybook/addon-essentials": "^8.1.11",
"@storybook/addon-interactions": "^8.1.11",
"@storybook/source-loader": "^8.1.11",
Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3e09fce

Please sign in to comment.