Turn the interactive Storybook a11y addon into a build gate: - @storybook/test-runner + axe-playwright over the static build (.storybook/test-runner.ts reads the a11y tags from story context) - test-storybook / test-storybook:ci scripts; storybook-a11y CI job - triage: escape-hatch a11y.disable on stories whose display:contents wrapper splits <ul>/<li> or <dl>/<dt>/<dd> (structural, deferred to WP-11/WP-12, each with justification + cross-ref) - fix trivial violations: footer/wizard-shell contrast, text-input label, wizard stories missing provideApiClient Verified: broken story fails the gate; 133 stories pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
30 lines
1.3 KiB
TypeScript
30 lines
1.3 KiB
TypeScript
import type { Meta, StoryObj } from '@storybook/angular';
|
|
import { applicationConfig } from '@storybook/angular';
|
|
import { provideRouter } from '@angular/router';
|
|
import { TaskListComponent } from './task-list.component';
|
|
|
|
const meta: Meta<TaskListComponent> = {
|
|
title: 'Molecules/Task List',
|
|
component: TaskListComponent,
|
|
decorators: [applicationConfig({ providers: [provideRouter([])] })],
|
|
render: (args) => ({ props: args, template: `<app-task-list [listHeading]="listHeading" [tasks]="tasks" />` }),
|
|
parameters: {
|
|
// Structural: app-choice-link's host sits between the keuzelijst <ul> and its <li>
|
|
// — axe's list/listitem rule needs them adjacent regardless of `display:contents`.
|
|
// WP-11 (CIBG markup fidelity) reworks this markup; see docs/backlog/WP-11-markup-fidelity.md.
|
|
a11y: { disable: true },
|
|
},
|
|
};
|
|
export default meta;
|
|
type Story = StoryObj<TaskListComponent>;
|
|
|
|
export const Default: Story = {
|
|
args: {
|
|
listHeading: 'Wat moet ik regelen',
|
|
tasks: [
|
|
{ title: 'Vraag uw herregistratie aan', description: 'Verleng uw registratie vóór 31 december 2026.', to: '/herregistratie', actionLabel: 'Herregistratie aanvragen' },
|
|
{ title: 'Controleer uw adresgegevens', description: 'Uw adres is langer dan een jaar niet bevestigd.', to: '/registratie', actionLabel: 'Bekijk uw gegevens' },
|
|
],
|
|
},
|
|
};
|