object-alt
它能做什么
这个技能检查页面上的每个 object 元素是否包含有用的文字或语义备用内容。它面向使用 object 标签嵌入文件或媒体的网站构建者。
适用场景
- ✓你请智能体审查页面中嵌入对象的无障碍性的时候。
- ✓嵌入的文件加载失败,访客什么都读不到的时候。
- ✓你在构建使用 object 元素的组件,并希望它具有无障碍性的时候。
技能链接
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/object-alt/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我检查页面上的 object 元素,并在缺少备用文字的地方添加吗?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会找出每个 object 元素,并检查其中是否包含描述性的备用内容。它会添加简单的文字或语义元素,在对象无法显示时作为等效内容。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Provide alternative text for objects
If an object fails to load or the user's browser doesn't support the format, alternative text ensures that the information is still accessible.
Quick Reference
- Include descriptive alternative text inside every
<object>element - The fallback content should serve as a functional equivalent
- Use simple text or other semantic elements as alternative content
Check
Check all <object> elements in the HTML to ensure they contain descriptive fallback content.
Fix
Add alternative text or a semantic fallback inside the <object> tags.
Explain
Explain how fallback content in <object> tags helps users who cannot load or view the primary object content.
Code Review
Review the rendered markup and interactive states that affect Provide alternative text for objects. Flag exact elements, roles, labels, focus behavior, or keyboard interactions that violate the rule, and note how to verify the fix with browser accessibility tooling or assistive tech.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/accessibility/object-alt
常见问题
备用文字应该写什么?
这个技能说,它应该起到功能等效的作用,让读者获得同样的信息。
备用内容可以是链接吗?
可以。这个技能提到简单文字或其他语义元素可作为备用内容,其中可以包括指向该文件的链接。
这样做为什么有帮助?
即使浏览器无法加载或显示该对象,访客仍能获得信息。
详情
作者的原始描述
Use when reviewing rendered HTML, interactive components, or design-system patterns related to Provide alternative text for objects. Check native semantics first, then inspect keyboard behavior, focus flow, accessible names, and screen-reader output where relevant.
热度
- GitHub 星标
- 75k
- 排名
- #2956
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
frontendchecklist
75k使用命令行工具,依据 380 多条关于无障碍、速度、SEO 和安全的规则,检查前端代码和线上页面。
frontend-checklist-global
75k依据全部 386 条 Front-End Checklist 规则审查前端项目,并为发现的每个问题给出具体修复方法。
404-page
75k检查你的页面缺失提示是否提供有用的链接,并返回真正的 404 状态,帮助迷路的访客找到方向。
about-page
75k审查你的网站是否有清晰的关于页面,说明由谁运营,以建立访客和搜索引擎的信任。