Skip to content

Commit

Permalink
chore: add a11y rules to Storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
sarkaaa committed Oct 24, 2024
1 parent b278439 commit 603a5f8
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions packages/orbit-components/.storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,29 @@ const preview: Preview = {
decorators: [orbitDecorator],
parameters: {
viewport: { viewports },
a11y: {
element: "#storybook-root",
config: {
rules: [
{
id: "aria-required-attr",
selector: "*:not(div.text-heading-title0[role='heading'])",
},
{
id: "color-contrast",
selector: "*:not(pre .attr-name.tag.token)",
},
{
id: "color-contrast-enhanced",
selector: "*:not(pre .attr-name.tag.token)",
},
{
id: "scrollable-region-focusable",
selector: "*not(pre.overflow-x-auto)",
},
],
},
},
},
};

Expand Down

0 comments on commit 603a5f8

Please sign in to comment.