paste-inputs
它能做什么
这个技能检查表单中是否有阻止用户向输入框粘贴文字的脚本或属性。它面向希望表单易于使用、友好的前端开发者。
适用场景
- ✓你请智能体检查是否有表单字段阻止粘贴的时候。
- ✓用户反映无法在你的网站上将密码或代码粘贴到某个字段的时候。
- ✓你在审查处理密码或支付信息的表单,并想确认允许粘贴的时候。
技能链接
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/paste-inputs/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“一些用户说无法在我网站的密码框中粘贴。请帮我找出阻止它的原因并移除吗?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会在代码中搜索粘贴事件处理程序和属性,例如返回 false 的 onpaste。它会移除这些阻碍,使所有输入框都能使用默认的粘贴行为。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Allow pasting into form inputs
Restricting pasting makes it difficult for users to use password managers or copy-paste long strings of data, which can lead to increased errors and a poor user experience.
Quick Reference
- Do not block the 'paste' event on any form input
- Ensure password fields and credit card inputs allow pasting from managers
- Remove
onpaste="return false"from all input elements
Check
Check the codebase for any JavaScript or HTML attributes that prevent users from pasting into form fields.
Fix
Remove any code (e.g., onpaste="return false") that blocks the default paste behavior in inputs.
Explain
Explain how allowing pasting into forms improves security and accessibility for users with physical or cognitive disabilities.
Code Review
Review the rendered markup and interactive states that affect Allow pasting into form inputs. 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/paste-inputs
常见问题
为什么应该允许粘贴?
这个技能说,阻止粘贴会让人难以使用密码管理器,并在输入较长字符串时更容易出错。
这对残障人士有帮助吗?
有帮助。这个技能说,允许粘贴对身体或认知有障碍的用户有帮助。
阻止粘贴有安全上的理由吗?
这个技能认为,允许粘贴能提升安全性,因为人们可以使用密码管理器。
详情
作者的原始描述
Use when reviewing rendered HTML, interactive components, or design-system patterns related to Allow pasting into form inputs. Check native semantics first, then inspect keyboard behavior, focus flow, accessible names, and screen-reader output where relevant.
热度
- GitHub 星标
- 75k
- 排名
- #2973
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
frontendchecklist
75k使用命令行工具,依据 380 多条关于无障碍、速度、SEO 和安全的规则,检查前端代码和线上页面。
frontend-checklist-global
75k依据全部 386 条 Front-End Checklist 规则审查前端项目,并为发现的每个问题给出具体修复方法。
404-page
75k检查你的页面缺失提示是否提供有用的链接,并返回真正的 404 状态,帮助迷路的访客找到方向。
about-page
75k审查你的网站是否有清晰的关于页面,说明由谁运营,以建立访客和搜索引擎的信任。