参加直播会议:周四,美国东部时间上午 11 点,Storybook 9 发布及问答

storybook-addon-a11y 的 CLI 工具。

在 Github 上查看

storybook-a11y-report

storybook-addon-a11y 的 CLI 工具。

storybook-a11y-report 已停止维护,请转而使用 Storybook 测试运行器和 axe-playwright!

storybook-a11y-report 项目现已停用。请切换至 Storybook 测试运行器和 axe-playwright 进行无障碍测试。我们感谢在 storybook-a11y-report 整个历程中支持它的所有人。

报告示例

Report examples

入门指南

先决条件

如果你已经在 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)

构建工具

许可证

本项目采用 MIT 许可证,详情请参阅 LICENSE 文件。