You are here:
- Manual
- Development
- Forms
Forms
Whatever functions forms may have (collecting information, contact forms, surveys, search functions, navigation and special script applications), interaction with the visitor is key.
Accessible forms
Web developers can improve the accessibility and organisation of a form by means of a few simple HTML elements.
Input fields and labels
Input fields in forms are often accompanied by ‘labels’: textual explanations of what type of information the visitor is expected to enter in a specific input field: the
labelelement.
Forms and keyboard navigation
As on links, the
tabindexattribute can be used on input fields. The web developer can use this to influence the order in which a visitor navigates the content of the form by means of the keyboard.
Grouping input fields in forms
Input fields and their labels in large, complex forms, can often be arranged in grouped together. Grouping input fields (and the relevant explanation) renders a form more accessible and easier to survey: the
fieldsetelement and labellingfieldset.
Forms for navigation
Sometimes web developers do not use forms for collecting information or for search functions, but as a user interface for navigating the website.
Forms for special script applications
Many of these forms are special script applications, such as scaling the font size on the pages, varying CSS (Cascading Style Sheets) for a modified appearance or other preference settings. Do not confront a visitor with an ineffective application when using optional technologies – for instance client-side scripts and CSS – that are not supported by the browser.
Accessibility of form results
When drawing up forms, web developers should ask themselves whether the results of the submitted form should be accessible through a sustainable and unique URL.
