diff --git a/code/addons/a11y/src/components/A11YPanel.stories.tsx b/code/addons/a11y/src/components/A11YPanel.stories.tsx index 353fddeaa1d..ee57ae4c7d5 100644 --- a/code/addons/a11y/src/components/A11YPanel.stories.tsx +++ b/code/addons/a11y/src/components/A11YPanel.stories.tsx @@ -2,11 +2,11 @@ import React from 'react'; import type { Meta, StoryObj } from '@storybook/react-vite'; -import type axe from 'axe-core'; import { ManagerContext } from 'storybook/manager-api'; import { fn } from 'storybook/test'; import { styled } from 'storybook/theming'; +import { results } from '../results.mock'; import { A11YPanel } from './A11YPanel'; import { A11yContext } from './A11yContext'; import type { A11yContextStore } from './A11yContext'; @@ -52,61 +52,6 @@ export default meta; type Story = StoryObj; -const violations: axe.Result[] = [ - { - id: 'aria-command-name', - impact: 'serious', - tags: ['cat.aria', 'wcag2a', 'wcag412', 'TTv5', 'TT6.a', 'EN-301-549', 'EN-9.4.1.2', 'ACT'], - description: 'Ensures every ARIA button, link and menuitem has an accessible name', - help: 'ARIA commands must have an accessible name', - helpUrl: 'https://dequeuniversity.com/rules/axe/4.8/aria-command-name?application=axeAPI', - nodes: [ - { - any: [ - { - id: 'has-visible-text', - data: null, - relatedNodes: [], - impact: 'serious', - message: 'Element does not have text that is visible to screen readers', - }, - { - id: 'aria-label', - data: null, - relatedNodes: [], - impact: 'serious', - message: 'aria-label attribute does not exist or is empty', - }, - { - id: 'aria-labelledby', - data: null, - relatedNodes: [], - impact: 'serious', - message: - 'aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty', - }, - { - id: 'non-empty-title', - data: { - messageKey: 'noAttr', - }, - relatedNodes: [], - impact: 'serious', - message: 'Element has no title attribute', - }, - ], - all: [], - none: [], - impact: 'serious', - html: '
', - target: ['.css-12jpz5t'], - failureSummary: - 'Fix any of the following:\n Element does not have text that is visible to screen readers\n aria-label attribute does not exist or is empty\n aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty\n Element has no title attribute', - }, - ], - }, -]; - const Template = (args: Pick) => ( @@ -177,18 +124,7 @@ export const Running: Story = { export const ReadyWithResults: Story = { render: () => { - return ( -