file-upload-accessibility
它能做什么
这项技能检查网站上的文件上传字段和拖放区域。适用于希望每个人都能上传文件的开发者。
适用场景
- ✓当文件上传按钮没有清晰标签的时候。
- ✓当拖放上传区域无法用键盘操作的时候。
- ✓当用户不知道允许哪些文件类型或大小的时候。
技能链接
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/file-upload-accessibility/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我让网站上的文件上传表单具备无障碍功能。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会检查上传的标签、接受的文件类型和反馈信息。它会建议一个适合键盘操作的拖放替代方案,并为进度和错误提供实时播报。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Make file uploads accessible
Unlabeled file inputs and inaccessible drag zones exclude screen reader and keyboard users from completing file upload tasks.
Quick Reference
- Always associate labels with file inputs
- Clearly communicate accepted file types and size limits
- Provide accessible progress feedback during uploads
- Make drag-and-drop zones keyboard accessible
Check
Verify file inputs have proper labels, accept attributes for file types, and accessible feedback for upload progress and errors.
Fix
Implement file uploads with visible labels, accept attribute restrictions, drag-and-drop alternatives, and ARIA live region feedback.
Explain
Explain how accessible file uploads provide clear instructions, feedback, and work for users relying on assistive technologies.
Code Review
Review templates, server-rendered HTML, and shared components that output markup related to Make file uploads accessible. Flag exact elements, attributes, and routes where the rendered HTML violates the rule.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/html/file-upload-accessibility
常见问题
为什么上传字段需要标签?
没有标签,屏幕阅读器用户就不知道该字段的用途。
accept 属性有什么作用?
它限制用户可以选择的文件类型,这项技能建议设置它,使要求更加清楚。
上传状态如何播报?
这项技能建议使用 ARIA live 区域,使屏幕阅读器能够播报进度和错误信息。
详情
作者的原始描述
Use when reviewing templates, rendered HTML, or shared components related to Make file uploads accessible. Validate the final browser-facing markup, not just the source framework abstraction.
热度
- GitHub 星标
- 75k
- 排名
- #2844
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
frontendchecklist
75k使用命令行工具,依据 380 多条关于无障碍、速度、SEO 和安全的规则,检查前端代码和线上页面。
frontend-checklist-global
75k依据全部 386 条 Front-End Checklist 规则审查前端项目,并为发现的每个问题给出具体修复方法。
404-page
75k检查你的页面缺失提示是否提供有用的链接,并返回真正的 404 状态,帮助迷路的访客找到方向。
about-page
75k审查你的网站是否有清晰的关于页面,说明由谁运营,以建立访客和搜索引擎的信任。