WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: [External Sender] Radio group without legend and fieldset


From: Brian Lovely
Date: Jan 17, 2020 7:27AM

Hey Sudheer,

This is good, but there are two things:

The group element does not support label, so change the group label from a
<label> to a non-semantic container like a div or span. I know it's
confusing but "group label" does not mean an actual <label> element.

I would not trust the implicit labels on the radio buttons, I would ensure
association by using the for attribute:

<label for="radioOne">
<input id="radioOne" type="radio" name="example-radio" value="One" />

...also I'm not sure if the "value" attribute is necessary on the radio
buttons, the label should take care of that.

On Fri, Jan 17, 2020 at 8:55 AM Sudheer Babu < <EMAIL REMOVED> > wrote:

> Hi All,
> Can you please check the below code and let me know if the implementation
> for the radio group is proper without the legend and fieldset and also if
> it pops up any error via tools like axe/wave.
> Thanks!
> <div role="group" aria-labelled-by="exampleId">
> <label id="exampleId">Choices</label>
> <label>
> <input type="radio" name="example-radio" value="One" />
> <span>One</span>
> </label>
> <label>
> <input type="radio" name="example-radio" value="Two" />
> <span>Two</span>
> </label>
> </div>
> > > https://urldefense.com/v3/__http://list.webaim.org/__;!!EFVe01R3CjU!MH1nbzetLWfeET5jGua9jCmL3eP4niaK4M40-KzKORZcTRIguJ4oKJH2IketpboYyNGuvA$
> List archives at
> https://urldefense.com/v3/__http://webaim.org/discussion/archives__;!!EFVe01R3CjU!MH1nbzetLWfeET5jGua9jCmL3eP4niaK4M40-KzKORZcTRIguJ4oKJH2IketpbqJ6txXyw$
> >

*Brian Lovely*
Capital One Digital Accessibility

The information contained in this e-mail is confidential and/or proprietary to Capital One and/or its affiliates and may only be used solely in performance of work or services for Capital One. The information transmitted herewith is intended only for use by the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.