|
|
||
| | ||
Creating Accessible Forms: OverviewWAC Workshop. November 2004. Covers: OSU Standards and electronic forms, distributing forms, screen readers and forms, elements of accessible form design, form layout, inserting and marking-up form elements, processing forms and error messages. Part V: Marking Up HTML Form Elements.In this section, we will consider each of the form elements and what information you need to include to insert these elements into your HTML form. Although we focus on HTML forms, the requirements are similar regardless of what kind of form it is PDF, scripted, or other although it may be more difficult to add the appropriate accessible markup. You can view a form with examples of all these elements on our Sample Form. Text Boxes.Text boxes require a unique label and unique ID for each box. Attach the label to the text box by using the "for" attribute in the LABEL tag. The "for" attribute should equal the "id" attribute in the INPUT tag. In FrontPage, type the label and insert the text box, then use the insert label feature to attach the two. Dreamweaver identifies all text boxes as "textfield." You need to add unique names/ids and change the "for" in the LABEL tag to reflect that unique name. <p align="left"> Example of Text Boxes:
Text Areas.Text areas, like text boxes, are also fairly straight forward. In most cases, engaging the "Return" button once inside a text area will create a new line of text and not send the form. But, be sure to test how your server interprets this action. Most problems occur when using client-side processing to validate the form (validates on detection of ENTER key). <p align="left"> Example of Text Area:
Radio Buttons.Radio buttons are the most problematic form element for users of assistive technology. In particular, for JAWS users, it can be difficult to engage "Forms Mode" when the cursor is focus on a radio button. In addition, when a group of radio buttons are used to answer a single question, it can be difficult to associate both the question and answer with each radio button. Finally, users can only turn a radio button on not off and at least one radio button must be selected in the group, making it very import to offer a "None" or "Does not apply" option. The WAC recommends using radio buttons sparingly and instead choosing a list or drop-down menu. Tips for Using Radio Button Groups:
<div align="left"> Example of Radio Buttons (inside FieldSet):
Check Boxes.In most cases, check boxes are preferable to radio buttons, because users can turn each box on ("checked") or off ("unchecked"). However, they are still a rather clumsy method of offering multiple choices the WAC recommends using the Menu/List box instead. Check boxes resemble text boxes in that each box must be given a unique ID and the label tag must be updated for each. Also, Dreamweaver does not assign a default value for each check box, so you must add this. FrontPage assigns each check box the value of "ON," which you can change, if desired. Like the radio button, add the FIELDSET and LEGEND tags to connect boxes related to the same form question/topic. <div align="left"> Example of Check Box Group:
Menus and List Boxes.Menus and list boxes are excellent choices for presenting multiple options in one field. They can be limited to accept only one answer or to allow multiple selections. Both FrontPage and Dreamweaver automate much of the work for accessible menus and list boxes. Notice in the example below that each OPTION tag does not require a separate label. Wherever a form element includes a VALUE attribute that attribute serves as the label for that form element. <p align="left"> Example of Menu Box (with drop-down menu):
Jump Menus.One very problematic form of the menu/list box the Jump Menu. When a user selects an option in a Jump Menu, a script, link, or other action is automatically engaged. Thus, the user only needs to click on the object once. However, keyboard users can only select the first item as soon as it is selected by the keyboard, the action is engaged and users cannot scroll down the rest of the list. Instead of a Jump Menu, add a "GO" or "Select" button next to the menu to allow users to initiate the action with an additional click. Note that this option typically relies on JavaScript or other client-side scripting to make the GO button work and should therefore not be used as the primary navigation method (See "Processing Forms" below). Buttons (Submit and Reset).The like the OPTION in a menu or list, the "value" attribute serves as the label for button elements and should therefore be as simple and clear as possible. In particular, note if engaging the button leads to a "next step" (data verification) in the form process and not to the completion/submission of the data. <p><input type="submit" name="Submit" value="Submit Your Question" tabindex="27" id="Submit" /></p> </form> Example of Button:
|
OSU Web Accessibility Center (WAC)
1760
Neil Ave
150
Pomerene Hall
Columbus,
Ohio
43210
Phone: (614) 292-1760
Fax: (614) 292-4190
E-mail: webaccess@osu.edu
For questions or problems with this site, including incompatibility with assistive technology,
email the WAC Webmaster.