Group form items
By breaking information into manageable chunks, visually impaired web users utilising screen readers can more easily work with the information, thereby improving the form's accessibility. If the following form were to get much longer it would become rather unmanageable for screen reader users (and rather unusable for sighted users):
To improve this form's accessibility, it can be simply and easily broken down using the <fieldset>
and <legend>
tags. The former defines the group and the latter the heading for the group. Using these commands the form can be manipulated to look like this:
The first group includes four form items in total and has the heading ‘Personal details’. The HTML to achieve this is:
<fieldset>
<legend>Personal details</legend>
--- Form items go here ---
</fieldset>
By breaking down long forms in this way, they're easier to manage both for visually impaired web users and non-disabled web users alike. Use the <fieldset>
and <legend>
tags for any long forms you have and both non-sighted and sighted users will thank you!
Group dropdown menu information
Not only should form items be grouped into manageable chunks to improve their accessibility, but so should items in dropdown boxes. Have a look at these two dropdown boxes and see which you think is easier to use:
(Please note, if you don't see any headings in the first box it could be because you're using a slightly older browser, such as Internet Explorer 5.x)
The first dropdown box is divided into topics, each with its own heading; the second simply lists the hobbies in alphabetical order. Visually impaired users utilising screen readers can listen to these sub-headings to close in on the answer they're looking for, greatly increasing their accessibility.
Imagine trying to use this second dropdown menu if there was a list of 100 hobbies. Trying to find your favourite hobby from this would be a nightmare, especially if you were looking for something like ‘Computer games’, which is actually listed under ‘p’ at ‘Playing computer games’.
Dropdowns menus don't rely on JavaScript
Dropdown menus which activate as soon as the user selects the item rely on JavaScript and are totally inaccessible to screen reader users. The following dropdown menu is accessible as it requires the user to click on the button in order to activate the form: