WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Markup for question and answer scenario

for

From: chaals
Date: Jun 21, 2015 6:35PM


- faulkner.steve@



20.06.2015, 10:51, "Steve Faulkner" < <EMAIL REMOVED> >:
> Can you provide an example question? also is it intended that there are
> multiple question on a page?
> anyway here is a stab at code for a single page pre question:

If there are multiple questions on a page I would put them each in a section, get the heading levels right, and you might have enough. Overthinking this might not be the most important accessibility issue to work on…

I assume that what you really want is reasonable navigation, right?

cheers

> <h1>Question 4</h1>
> <p>brief description</p>
> <p>..</p>
> <h2 id="question">specific question</h2>
> <fieldset aria-labelledby="question">
> The answer set (e.g., True or False, Multiple Choice, etc.)
> </fieldset>
>
> --
>
> Regards
>
> SteveF
> Current Standards Work @W3C
> <http://www.paciellogroup.com/blog/2015/03/current-standards-work-at-w3c/>;
>
> On 20 June 2015 at 09:36, Steve Faulkner < <EMAIL REMOVED> > wrote:
>
>>  On 20 June 2015 at 07:40, Sean Keegan < <EMAIL REMOVED> > wrote:
>>
>>>  Another attempt involved wrapping everything in a fieldset with the legend
>>>  set as the question number, and then using a nested fieldset or div on the
>>>  specific question and answer set. However, that nesting didn't seem quite
>>>  right either.
>>
>>  Hi Sean, right, unless it contains form controls fieldset is not the right
>>  way to mark it up
>>
>>  The fieldset element represents a set of form controls optionally grouped
>>>  under a common name.
>>
>>  http://www.w3.org/TR/html5/forms.html#the-fieldset-element
>>
>>  --
>>
>>  Regards
>>
>>  SteveF
>>  Current Standards Work @W3C
>>  <http://www.paciellogroup.com/blog/2015/03/current-standards-work-at-w3c/>;
>
> > > > --
Charles McCathie Nevile - web standards - CTO Office, Yandex
<EMAIL REMOVED> - - - Find more at http://yandex.com