Searchbox is here: Alt plus 4 |
|Go to main content|
Accessibility information page| |
||||||
![]() |
Online Accessibility
D
...a better web for everyone! |
||||||
Navigation begins hereHome (1)| |
Tutorial (U)| | Formats (F)| | Tags (G)| | Tools (L)| | Resources (R)| | Questions? (Q)| | |
Formats |
FormsForms can be accessible so long as they 1) enable screen readers to associate a label with its input and 2) provide context for users. Associating a label with input can be done in two ways, by making the relationship explicit through the Label For and Input ID elements, and/or by structuring the form linearly. StructureIf relying on structure alone, there are two things to remember:
ContextContext is provided by grouping questions or sections logically and identifying them by the Fieldset and Legend elements. Note that FieldSet and Legend work within the structure of forms and NOT across rows or columns defined by tables. For example, the comments form for this website contains both the accessibility elements described above and has proper structure. View the form for an illustration. View its style sheet to see how forms can be structured without tables. Label For and Input ID elements<p> <label for="FirstName">First name:</label> <input name="fn" type="text" id="FirstName"> </input></label></p> <p> <label for="SecondName">Second name:</label> <input name="sn" type="text" id="SecondName"> </input> </p> <p><label for="Select"> How useful was this website?</label> <select id="select" name="rate" size="1"> <option value="" selected> Please rate site</option> <option value="4">Very useful</option> <option value="3">Somewhat useful</option> <option value="2">Not very useful</option> <option value="1">Not useful at all</option> </select></p> <p>Which items were MOST useful?</p> <p class="Checkbox"> <input type="checkbox" name="tm" id="TutorialMost"></input> <label for="TutorialMost"> Tutorial</label> </p> Code Example: <form action="" method="post" name="Feedback"> <fieldset> <legend>Contact Information </legend> <p> <label for="FirstName">First name:</label> <input name="fn" type="text" id="FirstName"> </input></label></p> </fieldset> ...</form> |
||||||
|
|
Secondary navigation begins here| About this site (B) | Email (E) | Site Map (3) | Comments (9) | |
||||||