scan

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
Audit a live page and report what's broken and where. Locate; don't fix. If no URL in
$ARGUMENTS
, ask for one.
对在线页面进行审计,报告存在问题的内容及其位置。仅定位问题,不修复。若
$ARGUMENTS
中未包含URL,则请求用户提供。

1. 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 "<url>" --port "$PORT" --format json
Flags as needed:
--selector
,
--wait-for "<selector>"
,
--include-aaa
,
--disable <rules>
.
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 "<url>" --port "$PORT" --format json
可根据需要使用以下参数:
--selector
--wait-for "<selector>"
--include-aaa
--disable <rules>

2. Report

2. 报告

Counts by impact, then one entry per violation:
  • where — selector verbatim +
    file:line (symbol)
    if
    source
    is present — never fabricate. If no violation has
    source
    , note "source mapping unavailable — located by selector only".
  • evidence — contrast ratio, missing attribute, empty name
  • fix — mechanical change or
    NEEDS HUMAN
Don't edit. For fixes: apply mechanical ones then re-run to verify; for bulk work hand off to
accesslint:audit
.
按影响程度统计,然后为每一项违规生成一条记录:
  • 位置 —— 直接显示选择器;若存在
    source
    信息,则附加
    file:line (symbol)
    ——切勿编造信息。若所有违规均无
    source
    信息,请注明“源映射不可用——仅通过选择器定位”。
  • 证据 —— 对比度、缺失属性、空名称
  • 修复方案 —— 机械性修复或标记为
    NEEDS HUMAN
    (需人工处理)
请勿编辑内容。修复时:先执行机械性修复,然后重新运行工具验证;若为批量工作,请转交至
accesslint:audit
处理。

3. Tear down

3. 清理

bash
npx -y @accesslint/chrome@latest stop --all  # skip if ensure reported "managed":false
bash
npx -y @accesslint/chrome@latest stop --all  # 若ensure返回"managed":false则可跳过此步骤

Gotchas

注意事项

  • ensure
    always determines the port — never hardcode 9222.
  • CLI exit 2 = bad URL or page never loaded; check the dev server.
  • ensure
    会自动确定端口——切勿硬编码为9222。
  • CLI退出码2表示URL无效或页面未加载成功;请检查开发服务器。