Batch-scan Langflow frontend routes for accessibility issues using the Python IBM Equal Access scanner (scripts/a11y/a11y_scan.py) and produce JSON/Markdown/HTM
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-ibm-a11y-route-scan-f4fa2d645245 ,按照其中的说明把「ibm-a11y-route-scan」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Use this skill when asked to scan Langflow frontend pages for accessibility issues with the local Python scanner. This skill only reports — it does not modify code. For test-writing guidance, formal audits, or PR-wide fixes, see ibm-a11y-testing-guide, ibm-a11y-level1-audit, and ibm-a11y-pr-remediation.
Use the Python script:
uv run python scripts/a11y/a11y_scan.py \
--url http://localhost:3000 \
--routes-file scripts/a11y/a11y_routes.json \
--route-group static \
--out /tmp/langflow-a11y-report.json \
--markdown /tmp/langflow-a11y-report.md \
--html /tmp/langflow-a11y-report.html \
--timeout-ms 45000
Script options:
--url: base app URL, usually http://localhost:3000.--routes-file: route manifest JSON file. Prefer scripts/a11y/a11y_routes.json.--route-group: manifest group to scan. Default: static.--routes: comma-separated route paths to scan.--route: one route path; can be repeated instead of --routes.--levels: comma-separated issue levels. Default: violation.--out: JSON report path.--markdown: optional Markdown report path.--html: optional self-contained HTML report path.--timeout-ms: per-route timeout.--quiet-ms: network quiet window before scanning. Default: 1000.--states-file: JSON file with explicit modal/state actions.--headed: show browser while scanning.Use scripts/a11y/a11y_routes.json as the source of truth for route selection.
The normal CI/local batch is the manifest static group. Prefer that unless the user asks for custom, dynamic, or gated routes.
Common manifest-backed command:
uv run python scripts/a11y/a11y_scan.py \
--url http://localhost:3000 \
--routes-file scripts/a11y/a11y_routes.json \
--route-group static \
--out /tmp/langflow-a11y-static.json \
--markdown /tmp/langflow-a11y-static.md \
--html /tmp/langflow-a11y-static.html
Dynamic routes need real IDs before scanning:
/flow/:id//flow/:id/view/playground/:id//assets/knowledge-bases/:sourceId/chunksFor dynamic routes, get IDs from the loaded app, API responses, or existing test data before replacing placeholders.
Scan one route:
uv run python scripts/a11y/a11y_scan.py \
--url http://localhost:3000 \
--route /flows \
--out /tmp/langflow-a11y-flows.json
Scan multiple routes:
uv run python scripts/a11y/a11y_scan.py \
--url http://localhost:3000 \
--routes-file scripts/a11y/a11y_routes.json \
--route-group static \
--out /tmp/langflow-a11y-report.json \
--markdown /tmp/langflow-a11y-report.md \
--html /tmp/langflow-a11y-report.html
Scan more than violations:
uv run python scripts/a11y/a11y_scan.py \
--url http://localhost:3000 \
--routes-file scripts/a11y/a11y_routes.json \
--route-group static \
--levels violation,potentialviolation,recommendation \
--out /tmp/langflow-a11y-expanded.json
Scan route plus modal states:
uv run python scripts/a11y/a11y_scan.py \
--url http://localhost:3000 \
--states-file /tmp/langflow-a11y-states.json \
--out /tmp/langflow-a11y-modal-report.json \
--markdown /tmp/langflow-a11y-modal-report.md \
--html /tmp/langflow-a11y-modal-report.html \
--timeout-ms 45000
State file shape:
[
{
"route": "/settings/global-variables",
"states": [
{
"name": "new-global-variable-modal",
"open": [
{ "click": "[data-testid='api-key-button-store']" },
{ "waitFor": "[role='dialog']" }
],
"close": [
{ "press": "Escape" },
{ "waitForHidden": "[role='dialog']" }
]
}
]
}
]
Supported state actions:
{ "click": "<css selector>" }{ "clickText": "<visible text>" }{ "clickRole": { "role": "button", "name": "Create" } }{ "fill": { "selector": "<css selector>", "value": "text" } }{ "press": "Escape" }{ "press": { "selector": "<css selector>", "key": "Enter" } }{ "waitFor": "<css selector>" }{ "waitForHidden": "<css selector>" }{ "waitForText": "<visible text>" }{ "wait": 500 }{ "scroll": { "selector": "<css selector>", "to": "bottom" } } — to is top or
bottom; use "by": <pixels> for a relative scroll, and omit selector to scroll the
page. Needed for virtualised grids whose tabbable rows only disappear after scrolling.The scanner always writes JSON. It can also write Markdown and HTML for presentation.
Use JSON for exact data. Use Markdown for PR comments or issues. Use HTML when the user wants a browsable report.
Summarize:
Use report fields directly:
totalIssuesresults[].routeresults[].stateresults[].phaseresults[].apiRequestsresults[].requestFailuresresults[].diagnosticsresults[].issues[].ruleIdroutes.tsx.ibm-a11y-pr-remediation or ibm-a11y-level1-audit.