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: 'https://127.0.0.1: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 檔案。