Storybook addon that provides comprehensive accessibility testing for UI components using axe-core engine to ensure WCAG compliance
—
React components that provide the accessibility testing interface within Storybook, including the main panel, vision simulator, and detailed reporting views.
Main accessibility panel component that displays test results and provides interactive testing controls.
/**
* Main accessibility panel component for displaying test results
* Renders within Storybook's addon panel area
*/
function A11YPanel(): JSX.Element;The A11YPanel component provides:
Context provider for sharing accessibility state across components.
/**
* React context provider for sharing accessibility state
* @param props - Provider props containing children components
*/
function A11yContextProvider(props: {
children: React.ReactNode
}): JSX.Element;The context provider manages:
Usage:
import { A11yContextProvider, A11YPanel } from '@storybook/addon-a11y';
// Wrap the panel with context provider
function AddonPanel() {
return (
<A11yContextProvider>
<A11YPanel />
</A11yContextProvider>
);
}Component providing color vision deficiency simulation tools.
/**
* Vision impairment simulation tool for testing color accessibility
* Renders as a toolbar component in Storybook
*/
function VisionSimulator(): JSX.Element;The VisionSimulator provides:
Color vision filter controls for applying different accessibility simulations.
/**
* Color vision filter controls component
* Provides UI for selecting and applying color vision filters
*/
function ColorFilters(): JSX.Element;Supported filter types:
Tabbed interface component for organizing accessibility panel content.
/**
* Tab interface component for organizing panel content
* Provides navigation between violations, passes, and incomplete results
*/
function Tabs(): JSX.Element;Features:
Component for displaying environment-specific test discrepancy warnings.
/**
* Message component for displaying test environment discrepancy warnings
* Shows when test results may differ between environments
*/
function TestDiscrepancyMessage(): JSX.Element;Displays warnings for:
Detailed accessibility report display components.
/**
* Main accessibility report display component
* Renders comprehensive test results with violation details
*/
function Report(): JSX.Element;
/**
* Detailed violation information display component
* Shows specific violation details with remediation guidance
*/
function Details(): JSX.Element;The Report component provides:
The Details component shows:
The addon automatically registers its UI components with Storybook's manager:
// Automatic registration happens when importing the manager
import '@storybook/addon-a11y/manager';This registration adds:
// Panel registration configuration
addons.add(PANEL_ID, {
title: Title, // Custom title component with badge
type: types.PANEL,
render: ({ active = true }) => (
<A11yContextProvider>
{active ? <A11YPanel /> : null}
</A11yContextProvider>
),
paramKey: PARAM_KEY,
});// Vision simulator tool registration
addons.add(PANEL_ID, {
title: '',
type: types.TOOL,
match: ({ viewMode, tabId }) => viewMode === 'story' && !tabId,
render: () => <VisionSimulator />,
});All components are styled using Storybook's design system:
Components use React hooks and context for state management:
All UI components follow accessibility best practices:
Install with Tessl CLI
npx tessl i tessl/npm-storybook--addon-a11y