accessibility-scan
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAudit a live page and report each violation and where it is. Locate; don't fix.
Shared grounding and honesty conventions: .
../shared/methodology.md$ARGUMENTSdevstorybookaccesslint.config.jsonnpx @accesslint/cli init检测在线页面并报告每个违规问题及其位置。仅定位问题,不修复。
通用准则与诚信规范:。
../shared/methodology.md$ARGUMENTSdevstorybookaccesslint.config.jsonnpx @accesslint/cli init1. Audit
1. 检测
bash
PORT=$(npx -y @accesslint/chrome@latest ensure | node -e 'process.stdin.on("data",d=>process.stdout.write(""+JSON.parse(d).port))')
npx -y @accesslint/cli@latest scan <target> --port "$PORT" --format json<target>$ARGUMENTS""--selector--wait-for "<selector>"--include-aaa--disable <rules>accesslint.config.jsonbash
PORT=$(npx -y @accesslint/chrome@latest ensure | node -e 'process.stdin.on("data",d=>process.stdout.write(""+JSON.parse(d).port))')
npx -y @accesslint/cli@latest scan <target> --port "$PORT" --format json<target>$ARGUMENTS""--selector--wait-for "<selector>"--include-aaa--disable <rules>accesslint.config.json2. Report
2. 报告
Counts by impact, then one entry per violation:
- where: selector verbatim, plus if
file:line (symbol)is present. Don't fabricate. If no violation hassource, note "source mapping unavailable; located by selector only".source - evidence: contrast ratio, missing attribute, empty name.
- fix: mechanical change, or .
NEEDS HUMAN
Don't edit. For fixes, apply the mechanical ones and re-run to verify; for bulk work hand off to .
accesslint:accessibility-fix按影响程度统计,然后每个违规问题对应一条记录:
- 位置:直接显示选择器,若存在则额外显示
source。请勿编造信息。若所有违规问题均无file:line (symbol),需注明「源映射不可用;仅通过选择器定位」。source - 证据:对比度、缺失属性、空名称等。
- 修复方案:自动修复建议,或标记为(需人工处理)。
NEEDS HUMAN
请勿编辑内容。对于可自动修复的问题,应用修复后重新运行检测以验证;批量修复工作可移交至处理。
accesslint:accessibility-fix3. Tear down
3. 清理
bash
npx -y @accesslint/chrome@latest stop --all # skip if ensure reported "managed":falsebash
npx -y @accesslint/chrome@latest stop --all # 若ensure返回"managed":false则可跳过此步骤Notes
注意事项
- determines the port; don't hardcode 9222.
ensure - CLI exit 2 means a bad URL or target, or the page never loaded; check the dev server. An unknown target name makes the CLI list the available targets from .
accesslint.config.json
- 端口由命令确定;请勿硬编码9222。
ensure - CLI退出码为2表示URL或目标无效,或页面未加载;请检查开发服务器。若目标名称未知,CLI会列出中的可用目标。
accesslint.config.json