为何重要
触屏打字慢且易错(Reyal et al., 2015),数字键盘减少错误(Parhi et al., 2006),显著改善移动表单可用性。
设置方法
使用inputmode与autocomplete(MDN, n.d.-a, n.d.-b;Apple, n.d.;Android Developers, n.d.),也能自动填充验证码。
回车键与自动更正
回车改为“下一步”,邮箱栏关闭自动更正(WCAG 2.2 1.3.5),错误用即时验证提示。
常见问题
- 不能用type=number?
- 数量可以。
- 何时关闭自动更正?
- 邮箱、代码等输入框。
来源核查日期:2026-10-27
参考文献
- MDN Web Docs. (n.d.-a). inputmode. 指定虚拟键盘。
- MDN Web Docs. (n.d.-b). HTML attribute: autocomplete. 自动填充令牌。
- Apple. (n.d.). UITextContentType. UIKit documentation. iOS内容类型。
- Android Developers. (n.d.). Specify the input method type. inputType与动作键。
- Reyal, S., Zhai, S., & Kristensson, P. O. (2015). Performance and user experience of touchscreen and gesture keyboards in a lab setting and in the wild. In Proceedings of the 33rd Annual ACM Conference on Human Factors in Computing Systems (pp. 679–688). ACM. 触屏输入慢且易错。
- Parhi, P., Karlson, A. K., & Bederson, B. B. (2006). Target size study for one-handed thumb use on small touchscreen devices. In Proceedings of MobileHCI 2006 (pp. 203–210). ACM. 大键减少错误。
- World Wide Web Consortium. (2023). Web Content Accessibility Guidelines (WCAG) 2.2. 1.3.5输入目的标准。
