跳到正文
Skillpedia
网站与界面(前端)75k · #2973

paste-inputs

它能做什么

这个技能检查表单中是否有阻止用户向输入框粘贴文字的脚本或属性。它面向希望表单易于使用、友好的前端开发者。

适用场景

  • ✓你请智能体检查是否有表单字段阻止粘贴的时候。
  • ✓用户反映无法在你的网站上将密码或代码粘贴到某个字段的时候。
  • ✓你在审查处理密码或支付信息的表单,并想确认允许粘贴的时候。

技能链接

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/paste-inputs/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/paste-inputs/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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.

repo: thedaviddias/Front-End-Checklist

热度

GitHub 星标
75k
排名
#2973
许可证
MIT
更新时间
2026/10/31

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能