@H_502_5@Any form starts with a
form
element,inside which are placed the controls. Most controls are represented by theinput
element,which by default provides a text control. To label a control,thelabel
element is used; the label text and the control itself go inside thelabel
element. Each part of a form is considered a paragraph,and is typically separated from other parts usingp
elements. Putting this together,here is how one might ask for the customer’s name:
WAI: Forms > Grouping Controls
Grouping related form controls makes forms more understandable for all users,as related controls are easier to identify… In this example,the div
element has role=group
to indicate that the contained elements are members of a group and the aria-labelledby
attribute references the id for text that will serve as the label for the group…
@H_502_5@
它还建议使用< fieldset>和< legend>元素. <字段集> element为相关的表单控件提供了一个容器,< legend> element用作标识组的标题.
除此之外,样式和操作是许多开发人员的主要原因.
原文链接:https://www.f2er.com/html/426551.html