A11y

io.github.rog0x由 GitHub 账号 rog0x 发布v1.0.2更新于 Oct 24, 2026

Alt text, headings, contrast, ARIA for AI agents

概览

AI 生成的概览

一个本地 MCP 服务器,为 AI 助手提供审查 HTML 网页无障碍问题的工具,涵盖替代文本、标题、对比度、ARIA 和表单。

可以做什么
分析 HTML 中的图片,检查缺失、为空或质量低下的替代文本,包括链接图片、图片输入和图像区域。校验标题层级,发现跳级、多个 h1、空标题或过长标题,并返回标题大纲树。按 WCAG 2.x 计算前景与背景颜色的对比度,并报告普通文本和大号文本的 AA、AAA 合规情况。校验 ARIA 角色与属性,标记冗余角色以及 aria-label、aria-hidden 的不当使用。审查表单的标签关联、fieldset 与 legend 分组、仅用占位符作标签、autocomplete 建议和重复 ID。
适用场景
适合在检查 HTML 页面或组件的无障碍合规性、准备 WCAG 审查,或让助手解释并修复替代文本、标题、对比度、ARIA 和表单标签问题时使用。
运行要求
以本地进程通过 stdio 运行,从 npm 包安装并用 npm install 和 npm run build 构建;README 展示了在桌面客户端配置中用 node 启动构建后的入口文件。未声明账户、API 密钥或环境变量。
安装前请注意
它分析你提供的 HTML 并返回检查结果;README 未说明会写入、发送或删除数据。由于它会在本机执行代码,运行前请查看该包及其构建步骤。

安装

在 SourceWeft 中

  1. 打开 控制台中的 A11y,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

mcp-a11y-tools

Web accessibility analysis tools for AI agents, served over the Model Context Protocol (MCP).

Tools

check_alt_text

Analyze images in HTML for missing, empty, or low-quality alt text.

  • Detects missing alt attributes
  • Identifies decorative images (alt="" with role="presentation")
  • Flags low-quality alt text (e.g., "image", "photo", filenames)
  • Checks linked images, <input type="image">, and <area> elements

check_heading_hierarchy

Validate heading structure for proper nesting and content quality.

  • Verifies h1-h6 order with no skipped levels
  • Ensures a single <h1> per page
  • Detects empty, too-short, or too-long headings
  • Supports role="heading" with aria-level
  • Returns a visual tree of the heading outline

check_color_contrast

Check WCAG 2.x contrast ratio for foreground/background color pairs.

  • Calculates precise contrast ratio per WCAG relative luminance formula
  • Reports AA and AAA compliance for normal and large text
  • Accepts hex (#fff, #ffffff), rgb(r,g,b), and named colors

validate_aria

Validate ARIA attributes on HTML elements.

  • Detects invalid ARIA roles
  • Checks for missing required ARIA properties per role
  • Flags redundant ARIA roles that match native semantics
  • Warns about aria-label on non-interactive elements
  • Catches aria-hidden="true" on focusable elements

check_form_accessibility

Audit form elements for accessibility compliance.

  • Verifies every input has an associated label (explicit, implicit, or ARIA)
  • Checks radio/checkbox groups for <fieldset> and <legend>
  • Flags placeholder text used as the only label
  • Suggests autocomplete attributes for personal info fields
  • Detects duplicate IDs that break label association

Setup

bash
npm installnpm run build

Usage with Claude Desktop

Add to your claude_desktop_config.json:

json
{  "mcpServers": {    "a11y-tools": {      "command": "node",      "args": ["D:/products/mcp-servers/mcp-a11y-tools/dist/index.js"]    }  }}

License

MIT

来源:README.md,提交 f5c5682

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.0.2最新Sep 16, 2026

评分

已满足适用检查项的 40%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。