WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Using <legend> and <fieldset> on a single drop-down.

for

From: Patrick H. Lauke
Date: May 28, 2021 8:49AM


On 28/05/2021 15:02, Tom Livingston wrote:
> Would adjacent copy satisfy the role of a legend, such as in the case
> of a Yes/No radio button pair? Such as the related question in a <p>?
> For example:
>
> <p>Do you like kale?</p>
>
> <label for="yup">Absolutely</label>
> <input type="radio" id="yup" name="yestokale">
>
> <label for="nope">Gag</label>
> <input type="radio" id="nope" name="notokale">

I'd say no because this assumes an AT user is navigating sequentially
through the form in reading mode. If they just tabbed from one form
control to the next, if they're in forms mode, or used a shortcut key to
jump to the first radio button or something, that text won't be
announced because it's not programmatically denoted as acting as the
overarching label/legend for the group (and hence, a failure of 1.3.1).

P
--
Patrick H. Lauke

https://www.splintered.co.uk/ | https://github.com/patrickhlauke
https://flickr.com/photos/redux/ | https://www.deviantart.com/redux
twitter: @patrick_h_lauke | skype: patrick_h_lauke