Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ const preview: Preview = {
date: /Date$/i,
},
},

a11y: {
// 'todo' - show a11y violations in the test UI only
// 'error' - fail CI on a11y violations
// 'off' - skip a11y checks entirely
test: 'todo',
},
},
decorators: [
withThemeByClassName({
Expand Down
3 changes: 2 additions & 1 deletion .storybook/vitest.setup.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import * as a11yAddonAnnotations from '@storybook/addon-a11y/preview'
import { beforeAll } from 'vitest'
import { setProjectAnnotations } from '@storybook/react-vite'
import * as projectAnnotations from './preview'

// This is an important step to apply the right configuration when testing your stories.
// More info at: https://storybook.js.org/docs/api/portable-stories/portable-stories-vitest#setprojectannotations
const project = setProjectAnnotations([projectAnnotations])
const project = setProjectAnnotations([a11yAddonAnnotations, projectAnnotations])

beforeAll(project.beforeAll)
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
"packageManager": "[email protected]",
"devDependencies": {
"@eslint/js": "^9.26.0",
"@storybook/addon-a11y": "^9.0.0-rc.2",
"@storybook/addon-designs": "^10.0.0",
"@storybook/addon-docs": "^9.0.0-rc.2",
"@storybook/addon-themes": "^9.0.0-rc.2",
"@storybook/addon-vitest": "9.0.0-rc.2",
"@storybook/react-vite": "^9.0.0-rc.2",
"@storybook/test-runner": "^0.22.0",
"@storybook/addon-a11y": "^10.1.11",
"@storybook/addon-designs": "^11.1.1",
"@storybook/addon-docs": "^10.1.11",
"@storybook/addon-themes": "^10.1.11",
"@storybook/addon-vitest": "10.1.11",
"@storybook/react-vite": "^10.1.11",
"@storybook/test-runner": "^0.24.2",
"@types/node": "^22.15.3",
"@types/react": "^18.2.0",
"@vitejs/plugin-react": "^4.4.1",
Expand All @@ -37,13 +37,13 @@
"eslint": "^9.26.0",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^0.4.20",
"eslint-plugin-storybook": "^9.0.0-rc.2",
"eslint-plugin-storybook": "^10.1.11",
"globals": "^16.0.0",
"markdownlint-cli": "^0.45.0",
"playwright": "^1.56.1",
"prettier": "^3.5.3",
"shadcn": "2.5.0",
"storybook": "^9.0.0-rc.2",
"storybook": "^10.1.11",
"typescript": "~5.7.2",
"typescript-eslint": "^8.31.1",
"vite": "^6.3.1",
Expand Down
Loading