pa11y 介绍
pa11y 是自动化可访问性测试工具,在命令行运行 HTML
CodeSniffer 来生成程序化可访问性报告。
pa11y nature.com var pa11y = require('pa11y'); pa11y(options, function (error, test, exit) { test('nature.com', function (error, results) { /* ... */ }); });
pa11y 要求 Node.js 0.10+ 和 PhantomJS to
run.
在 Mac 使用 Homebrew 安装:
$ brew install node $ brew install phantomjs
命令行工具
Usage: pa11y [options] <url> Options: -h, --help output usage @R_784_4045@ion -V, --version output the version number -s, --standard <name> the accessibility standard to use: Section508, WCAG2A, WCAG2AA (default), WCAG2AAA -r, --reporter <reporter> the reporter to use: cli (default), csv, html, json -l, --level <level> the level of message to fail on (exit with code 2): error, warning, notice -i, --ignore <ignore> types and codes of messages to ignore separated by semi-colons -c, --config <path> a JSON config file -p, --port <port> the port to run PhantomJS on -t, --timeout <ms> the timeout in milliseconds -d, --debug output debug messages
pa11y 官网
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。