为何显示
小键盘易输错,掩码让人看不到(Norman, 1981;Nielsen, 2009),仅靠记忆核对也难(Miller, 1956)。
与安全平衡
难用的安全措施会被绕过(Adams & Sasse, 1999;Inglesant & Sasse, 2010)。NIST(2024)也建议显示与粘贴。配合生物识别登录更好。
设计与无障碍
放在框内右侧并保持光标;提供名称与状态(WCAG 2.2 4.1.2),不阻止粘贴(3.3.8)。结合行内校验与移动表单原则。
常见问题
- 会降低安全吗?
- 默认隐藏、按需显示,风险很小。
- 光标跳到开头?
- 切换类型时保存并恢复光标位置。
来源核查日期:2026-10-27
参考文献
- Nielsen, J. (2009, June 23). Stop password masking. Nielsen Norman Group. 掩码增加输错与放弃。
- Adams, A., & Sasse, M. A. (1999). Users are not the enemy. Communications of the ACM, 42(12), 40–46. 难用的安全措施会被绕过。
- Inglesant, P. G., & Sasse, M. A. (2010). The true cost of unusable password policies: Password use in the wild. In Proceedings of the SIGCHI Conference on Human Factors in Computing Systems (pp. 383–392). ACM. 复杂密码规则的代价。
- National Institute of Standards and Technology. (2024). Digital identity guidelines: Authentication and authenticator management (NIST SP 800-63B-4). 建议显示密码并允许粘贴。
- Norman, D. A. (1981). Categorization of action slips. Psychological Review, 88(1), 1–15. 看不见时的误输入。
- Miller, G. A. (1956). The magical number seven, plus or minus two: Some limits on our capacity for processing information. Psychological Review, 63(2), 81–97. 长密码的记忆限制。
- World Wide Web Consortium. (2023). Web Content Accessibility Guidelines (WCAG) 2.2. 3.3.8与4.1.2标准。
