21 Forms Availability

Source: Internet
Author: User

Forms are not the easiest thing for a disabled user, and the navigation of the content page is one, and the form region and the input information are the other. So it's a good idea to add some elements to the form.

Labels logo

Each form region should have its own label. Use the label label category to use for attributes to combine the label with the elements of the form.

<form><label for="yourName">Your Name</label>id="yourName" />...

Click on the label area displayed by the browser, and the focus will run to the form area of the label Union.

Note: name and id all must have. nameused to manipulate the form area and id to contact label.

Field Sets and legends

You can set up a group for the area, such as name (surname, first name, middle, title wait) or address (line one, second line, country, zip code, etc.). Use fieldset labels.

You can use the build legend in field set legend .

Note: The browser uses a border to surround field sets, while legends breaks the left or top border.

<form action="somescript.php" ><fieldset><legend>Name</legend><p>First name <input type="text" name="firstName" /></p><p>Last name <input type="text" name="lastName" /></p></fieldset><fieldset><legend>Address</legend><p>Address <textarea name="address" ></textarea></p><p>Postal code <input type="text" name="postcode" /></p></fieldset>...

Option group

optgroupThe label is used to group options in the Select box. It requires label attributes, and the displayed values are not selected at the top of each group in the Drop-down list.

<select name="country"><optgroup label="Africa"><option value="gam">Gambia</option><option value="mad">Madagascar</option><option value="nam">Namibia</option></optgroup><optgroup label="Europe"><option value="fra">France</option><option value="rus">Russia</option><option value="uk">UK</option></optgroup><optgroup label="North America"><option value="can">Canada</option><option value="mex">Mexico</option><option value="usa">USA</option></optgroup></select>

Navigation Area

Like links, form fields (and field sets) need to navigate without pointing to an appliance (such as a mouse). As with links, use the form element-tab stops and access keys

accesskeyand tabindex attributes are applied to form labels, such as input and legend tags.

accesskey="f" tabindex="1" />






Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.