WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Navigation in HTML forms


From: Christophe Strobbe
Date: Apr 22, 2009 8:10AM

Hi Hadi,

At 17:37 21/04/2009, you wrote:
>For many years we have been recommending to use fieldset/legend elements to
>make radio buttons and check boxes accessible. With this technique you
>associate each
>radio or checkbox item with the proper legend element so a screen reader
>user always knows what group of radio or checkbox items he is dealing with.
>so far so good.
>On the other hand, I have been recommending to make the question surveys a
>heading (h2-h6) especially in large surveys. This would allow screen reader
>users to navigate easily between questions and/or skip selected questions
>using screen reader heading navigation function.
>Here's the problem:
>Apparently, HTMl does not allow the use of header elements inside or outside
>the legend element so I can't not make my radio or checkbox question a
>heading in the form. (...)

Indeed, HTML 4 does not allow this. My first reaction was to check whether
HTML 5 and XHTML 2 would allow this.
HTML 5 does not allow it:
In XHTML 2, the matter is a little bit more complex because it uses
XForms. XForms doesn't use 'fieldset' and 'legend' elements;
the XForms counterparts of these HTML elements are called
'group' and 'label'. The 'label' element does not appear to allow
heading elements.

However, in both HTML 5 and XHTML 2 it should be possible to use headings
elsewhere in a form. Some commenters seem to find this helpful.

Best regards,


Christophe Strobbe
K.U.Leuven - Dept. of Electrical Engineering - SCD
Research Group on Document Architectures
Kasteelpark Arenberg 10 bus 2442
B-3001 Leuven-Heverlee
tel: +32 16 32 85 51
"Better products and services through end-user empowerment"
Please don't invite me to LinkedIn, Facebook, Quechup or other
"social networks". You may have agreed to their "privacy policy", but
I haven't.