An acot custom runner for Storybook.
The @acot/acot-runner-storybook
crawls all the Stories in Storybook and sets them up for acot to audit.
Install via npm:
$ npm install --save-dev @acot/acot-runner-storybook
Add @acot/storybook
to the runner
field of the acot config file.
{
"runner": "@acot/storybook"
}
or the CLI's --runner
flag with @acot/storybook
.
$ acot run --runner "@acot/storybook"
You can pass a custom config to the parameters.acot
field in Story's metadata, as in the following example:
// Component Story Format (CSF) Example:
export default {
title: 'Button',
component: Button,
parameters: {
acot: {
rules: {
'@acot/wcag/button-has-name': 'off',
},
},
},
};
- Storybook v5
T.B.A
Since @acot/acot-runner-storybook
doesn't rely on UI frameworks like React, Angular, or Vue.js, it can be used in conjunction with any UI framework of your choice!
T.B.A