扫描任意 URL
scan_url 本地开发服务器、预发布环境、生产环境或磁盘上的文件。
- 使用 CSS 选择器聚焦单个组件
- 等待客户端渲染的内容加载完成
- 桌面端和移动端视口
- 可选:对扫描区域截图
Agora 新功能 · MCP 服务器
Agora 内置的 MCP 服务器为 Claude Code、Cursor、GitHub Copilot 以及任何支持 MCP 的智能体提供真正的无障碍测试工具。智能体会扫描刚刚构建的页面,准确了解哪里不合规、原因何在,随即修复代码并再次扫描加以验证——这一切都在拉取请求创建之前完成。
编程会话动画示例:一位开发者让 AI 智能体检查 localhost:3000/checkout 的无障碍问题并进行修复。智能体调用 Agora 的 scan_url 工具,得到 58 分(满分 100 分),并发现四个问题:一个没有名称的按钮、一张没有替代文本的图片、低对比度文本以及一个没有标签的输入框。它修改了三个文件中的代码,再次扫描后达到 100 分(满分 100 分)。
适用于
AI 编写界面的盲区
编程智能体从网络中学习,而网络上的大多数内容并不具备无障碍性:仅有图标的按钮、缺失的标签、低对比度的文本。没有测试手段,智能体就无法判断刚生成的组件能否被键盘或屏幕阅读器用户正常使用。现在它可以自行检查了,使用的正是您的无障碍团队早已信赖的引擎。
一分钟完成设置
MCP 服务器随 Agora 一同启动,且仅在您的电脑上监听。“AI 智能体”页面会显示其状态及要使用的地址。
从 Agora 复制一条命令或配置片段,或使用 Cursor 和 VS Code 的一键安装。
“扫描 localhost:3000 并修复发现的问题。”智能体会调用 Agora,应用修复并加以验证。
工具调用内部一览
没有含糊的分数。Agora 会返回每一项违规及其对应的 WCAG 准则、具体元素、元素的 HTML 和明确的修复方案,格式可供智能体立即据此行动。
智能体 → Agora
{ "method": "tools/call", "params": { "name": "scan_url", "arguments": { "url": "localhost:3000/checkout", "selector": "#payment-form", "viewports": ["desktop", "mobile"] } }} Agora → 智能体
http://localhost:3000/checkout
3 个问题 · 5 个元素 · WCAG 2.2 AA
button-name WCAG 4.1.2 Buttons must have discernible text
button.pay-apple
<button class="pay-apple"><svg …/></button> 修复方法: Element does not have inner text that is visible to screen readers; aria-label attribute does not exist or is empty
label WCAG 4.1.2 Form elements must have labels
#card-cvc
<input id="card-cvc" placeholder="CVC"> 修复方法: Element does not have an explicit <label>; aria-label attribute does not exist or is empty
color-contrast WCAG 1.4.3 Elements must meet minimum color contrast ratio thresholds
.total__hint
<p class="total__hint">Taxes included</p> 修复方法: Element has insufficient color contrast of 2.9 (foreground color: #a3a3a3, background color: #ffffff). Expected contrast ratio of 4.5:1
智能体 → Agora
{ "method": "tools/call", "params": { "name": "scan_html", "arguments": { "html": "<nav class=\"tabs\">…</nav>", "baseUrl": "http://localhost:3000/", "mode": "component" } }} Agora → 智能体
HTML component (2.4 KB)
3 个问题 · 4 个元素 · WCAG 2.2 AA
aria-required-children WCAG 1.3.1 Certain ARIA roles must contain particular children
nav.tabs > ul[role="tablist"]
<ul role="tablist">…</ul> 修复方法: Element has children which are not allowed: li[tabindex]
aria-valid-attr-value WCAG 4.1.2 ARIA attributes must conform to valid values
#tab-billing
<a id="tab-billing" aria-controls="billing"> 修复方法: Invalid ARIA attribute value: aria-controls="billing"
heading-order Best Practice Heading levels should only increase by one
.panel > h4
<h4>Billing address</h4> 修复方法: Heading order invalid
四款工具,覆盖所有工作流
scan_url 本地开发服务器、预发布环境、生产环境或磁盘上的文件。
scan_html 在组件接入页面之前即可审查,无需服务器。
validate_attributes 扫描器能发现缺失的名称,此工具则检查现有名称是否真正有意义。
simulate_screen_reader 直接基于 Chrome 无障碍树,像盲人用户一样“聆听”页面或组件。
默认即无障碍
无需在数周后单独审计,测试就在智能体本已执行类型检查、测试和代码规范检查的同一循环中进行。
构建
智能体编写或修改界面。
扫描
针对页面或组件调用 Agora。
修复
应用 Agora 指出的修复方案。
验证
再次扫描,直到问题全部消除。
团队选择它的理由
服务器仅接受来自您本机的连接,页面在 Agora 内部本地渲染和扫描。
axe-core 搭配 WCAG 2.0、2.1 和 2.2 的 A 级与 AA 级规则,另可选 AAA 级检查:与 Agora 其他所有扫描使用相同规则。
页面在 Chrome 中渲染,样式、脚本和客户端渲染都会纳入测试。
使用自签名证书的开发服务器、file:// 路径,以及已在 Agora 中保存基本认证凭据的页面,都能直接使用。
共享的常驻浏览器让扫描保持快速,智能体可以在每次修改后进行检查。
Claude Code、Cursor、搭配 GitHub Copilot 的 VS Code、Windsurf、Claude Desktop、Codex CLI 和 Gemini CLI,Agora 内为每一款提供设置步骤。