跳到内容

表单

表单相关元素和属性

表单体验与情绪

Surprisingly, <input type="color"/> was the most used form-related feature this year, with 41.8% of respondents reporting having used it.

But when looking at positive sentiment, basic UI building blocks like autocomplete (<datalist>) and dropdowns (Customizable Select) top the rankings, showing that developers value features that are customizable and can be tailored to their needs.

通过...分组:

根据此项排序:

1
表单
48.9%
39.5%
10.7%
2
表单
44.1%
32.8%
21.7%
3
表单
19.1%
30.3%
50.1%
4
表单
19%
47.8%
32.5%

经验

  • <span aria-hidden="true">🤓</span> 用过: 使用过此项目的受访者。
  • <span aria-hidden="true">👀</span> 有听说过: 听说过此项目,但没有使用过此项目的受访者。
  • <span aria-hidden="true">🤷</span> 没听说过: 从未听说过此项目的受访者。

情绪(态度)

  • 积极: 有兴趣了解此技术,或者愿意再次使用它的受访者
  • 中立: 未对此技术发表看法的受访者
  • 消极: 对此技术不感兴趣,或者使用此技术有糟糕体验的受访者

Styling & customization of default form control UI elements remains a big stumbling block, with nearly half of pain points being about it.

Form validation is also a problem, especially when it comes to more advanced use cases like validating one field's value based on another.

您在使用 HTML 表单时遇到了哪些痛点?
(自由提问)
多选
总体上最主要的痛点主题。

视图:

不为“limitations”之一的项目
0%
20%
40%
60%
80%
100%
01
Styling & customization
6
02
Input element issues
9
03
Browser vendor issues
3
+1
04
Form Validation
7
-2
05
Accessibility
1
+1
06
End-user experience
+12
07
Developer Experience
08
Cognitive overload
+5
09
Editing APIs
1
+7
10
Reliance on JavaScript
-1
11
Forms & JS
1
+6
12
Form handling
1
13
1
+7
14
Label issues
15
Education
16
17
State management
1
18
HTTP actions
19
Reliance on frameworks
20
Form Submission
-10
21
Technical issues
1
22
<button>
23
Multi-step forms
0%
20%
40%
60%
80%
100%
CSS-only Form Validation Hints
Kevin Powell

CSS-only Form Validation Hints

A look at how we can use CSS to add contextual hints to users as they fill out a form, including creating an SVG by hand and animating it based on whether a field is valid or invalid.
感谢合作伙伴对我们的支持! 了解更多。