Wednesday, August 15, 2007
Writing HTML forms to be accessible: some questions
I’m curious to know which is of the following constructions is easier for a screen-reader user to work with.
Firstly:
(start label) I need to collect [input for number] tins (end label)
(start label) I need to collect [input for number] bottles (end label)
Secondly:
I need to collect
(start label) [input for number] tins (end label)
(start label) [input for number] bottles (end label)
The first repeats the question, making rather a lot of verbal noise but also allowing the label to describe the input fairly completely. The second avoids the repetition, but the inputs are then identified only as ‘bottles’ and ‘tins’ - and the form might include several places where numbers of (or other information about) bottles and tins were collected. Would the use of a fieldset allow a user with a screen-reader to move to an input and be told it was the ‘tins’ input within the ‘I need to collect’ fieldset?
And in that case, should the fieldset legend always describe the type of information being solicited; for example by being written as ‘How many items do I need to collect?’ and then containing inputs labelled ‘number of tins’ and ‘number of bottles’?
What happens when there are two or three sentence-like questions, similar to the second example above, within a single fieldset? Is that always going to be hard for the screen-reader user to comprehend?
Or are both examples of bad practice?
Firstly:
(start label) I need to collect [input for number] tins (end label)
(start label) I need to collect [input for number] bottles (end label)
Secondly:
I need to collect
(start label) [input for number] tins (end label)
(start label) [input for number] bottles (end label)
The first repeats the question, making rather a lot of verbal noise but also allowing the label to describe the input fairly completely. The second avoids the repetition, but the inputs are then identified only as ‘bottles’ and ‘tins’ - and the form might include several places where numbers of (or other information about) bottles and tins were collected. Would the use of a fieldset allow a user with a screen-reader to move to an input and be told it was the ‘tins’ input within the ‘I need to collect’ fieldset?
And in that case, should the fieldset legend always describe the type of information being solicited; for example by being written as ‘How many items do I need to collect?’ and then containing inputs labelled ‘number of tins’ and ‘number of bottles’?
What happens when there are two or three sentence-like questions, similar to the second example above, within a single fieldset? Is that always going to be hard for the screen-reader user to comprehend?
Or are both examples of bad practice?

Comments (0)
» Post a Comment | Back to blog index