| Monash home | About Monash | Faculties | Campuses | Courses | Contact Monash |
| Staff directory | A-Z index | Site map |
Designing formsThe following guidelines will help you design forms that are accessible and work in a variety of browsers. Position labels for form elements carefullyPosition labels so that they are read out immediately before the form input field. In most cases, this means placing the label above or to the left of the form input field. For radio buttons and checkboxes the label should be positioned immediately after the form input field. Doing this will makes content easier to scan and improve readability for sighted users. It will also ensure the read order for screen reader users is correct. The disadvantage of a vertical design is the increased length of the form. You may find it better to split the form into more than one page - although this means that you will need to pay particular attention to navigation through the different pages of the form. Use <label> to explicitly associate the form label with the input fieldTo associate a label with a form input field, use the
If you are using a table to layout the form this is how to associate the form label with the form input field:
Grouping form fieldsGrouping fields using fieldsetsOften forms are made up of two or more sections. On an event booking form there might be fields to collect your contact details and fields collecting information about the events you wish to attend. Using headings to group these section is a quick and easy way which can make the form easier to understand. Another way of grouping form fields is by using the <fieldset> element. This is visually displayed in a browser as a solid line around a number of form fields with the legend text intersecting top of box. The following markup shows how the form fields are grouped and titled using the
Grouping menu optionsIf you have a menu form field which contains multiple groups of information they can be grouped using the <optgroup> element. These groups will be displayed in the browser as a dropdown menu with bold group headings and indented options like so: The following markup shows how the menu options can be grouped using the
Indicate mandatory fields using the word "required"Mandatory fields must be labeled with the word "required" immediately after the field name and within the actual field label. In addition to this, mandatory fields can be also marked up as a different colour (eg. red) to enhance visual identification, but colour must not be used as the only means of conveying a mandatory field. Use HTML buttons rather than image buttonsUsing images for buttons cause difficulty for users who need to increase the text size or use a screen magnifier. Images don't enlarge well as the text can become jagged and difficult to read. If styles and markup are used to create the button when the text size is increased the text size on the button will also gracefully increase. If you must use an image make sure that the alt attribute contains meaningful description. For example:
Don't add "Clear" or "Reset" buttons to your formWhilst there may be forms which require a "Clear" or "Reset" button the majority of forms don't and will not benefit from having these buttons added. The reasons being:
Resources |