storybook-a11y-report
storybook-addon-a11y 的 CLI 工具。
storybook-a11y-report 已停止维护,请转而使用 Storybook 测试运行器和 axe-playwright!
storybook-a11y-report 项目现已停用。请切换至 Storybook 测试运行器和 axe-playwright 进行无障碍测试。我们感谢在 storybook-a11y-report 整个历程中支持它的所有人。
报告示例
入门指南
先决条件
如果你已经在 Storybook 中进行开发并且 storybook-addon-a11y 工作正常,那么此模块也将正常工作。如果尚未安装 storybook-addon-a11y,请从本指南开始。
安装 / 入门
# Locally in your project.
npm install -D storybook-a11y-report
# Or globally.
npm install -g storybook-a11y-report
# You will need to start Storybook before running this command.
npx storybook-a11y-report
选项
--include, -i Name of stories to narrow down (supports minimatch)
--exclude, -e Name of stories to ignore (supports minimatch)
--filter, -f ID of A11y to narrow down
--omit, -o ID of A11y to ignore
--exit, -q The process will be terminated abnormally, if there is an a11y violation in the report result (mainly for CI)
--storybookUrl URL of Storybook (default: 'http://localhost:6006')
--outDir Directory to output the report file (default: '__report__')
--outputFormat Format of the output report, supports md or html (default: md)
构建工具
- Storycrawler - 使用 Puppeteer 构建 Storybook 抓取工具的实用程序
- storybook-addon-a11y - 在 Storybook 中测试组件的用户无障碍性
- minimatch - 一个极简的匹配工具
许可证
本项目采用 MIT 许可证,详情请参阅 LICENSE 文件。