WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: required or aria required usage

for

Number of posts in this thread: 6 (In chronological order)

From: Farough, David (CFP/PSC)
Date: Wed, May 06 2020 8:07AM
Subject: required or aria required usage
No previous message | Next message →

In a scenario where you have a group of checkboxes where checking one is required, what is the best way of doing this?

It appears to me that you cannot specify aria-required on a group. Is this correct?
It does not make sense to me to specify aria-required for each of the checkboxes if only one is required.

Thanks

David Farough
Application Accessibility Co-ordinator,
Corporate IT Management
Public Service Commission of Canada/ Government of Canada
= EMAIL ADDRESS REMOVED =
Tel: 819-420-8418 / Fax: 819-420-8408

From: Brian Lovely
Date: Wed, May 06 2020 8:34AM
Subject: Re: [External Sender] required or aria required usage
← Previous message | Next message →

You can use it for the radiogroup role (where there is always one button
selected) but not with the group role (as with a group of related
checkboxes)

On Wed, May 6, 2020 at 10:07 AM Farough, David (CFP/PSC) <
= EMAIL ADDRESS REMOVED = > wrote:

> In a scenario where you have a group of checkboxes where checking one is
> required, what is the best way of doing this?
>
> It appears to me that you cannot specify aria-required on a group. Is
> this correct?
> It does not make sense to me to specify aria-required for each of the
> checkboxes if only one is required.
>
> Thanks
>
> David Farough
> Application Accessibility Co-ordinator,
> Corporate IT Management
> Public Service Commission of Canada/ Government of Canada
> = EMAIL ADDRESS REMOVED =
> Tel: 819-420-8418 / Fax: 819-420-8408
>
>
>
> > > https://urldefense.com/v3/__http://list.webaim.org/__;!!EFVe01R3CjU!JQ0kWGrwcdyHg8_KQO0dOv0BnMNvtV4G92AzHg40qktMDjSAU4QSCVIBtvN2Ps3__w8iYQ$
> List archives at
> https://urldefense.com/v3/__http://webaim.org/discussion/archives__;!!EFVe01R3CjU!JQ0kWGrwcdyHg8_KQO0dOv0BnMNvtV4G92AzHg40qktMDjSAU4QSCVIBtvN2Ps1zTAWRaw$
> >


--
*Brian Lovely*
Capital One Digital Accessibility
804.389.1064




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.

From: Jared Smith
Date: Wed, May 06 2020 9:13AM
Subject: Re: required or aria required usage
← Previous message | Next message →

I think <fieldset aria-required="true"> would be best. I'm not sure on
the support for this yet. Also, the semantics seem a bit off because
checkboxes inherently mean they can be checked or not, which means
that they are not required, whereas aria-required on the fieldset
means that something is required.

Probably best of all is to ensure that this is clear in the text
instructions, optimally in a fieldset legend, along with good error
messaging and handling

Jared

From: Mallory
Date: Thu, May 07 2020 3:30AM
Subject: Re: required or aria required usage
← Previous message | Next message →

At Tenon we wrestled with this for the Tenon UI.

Unfortunately it's become a more popular UI component, a set of checkboxes where at least one must be checked but radios or a select cannot be used because users may check more.

What we ended up with:
- the legend adds either the word "required" (for radios) or "choose at least 1" (for checkboxes
- resultant error messages stuffed inside the legend

"aria-required" on the fieldset probably wouldn't have hurt, but we didn't do that. Maybe there wasn't enough AT support back then?

Also, getting error messages to be both programmatically associated with the group and read out wasn't very doable cross-browser: stuffing error messages inot the legend worked the best, even though semantically we'd have preferred doing it differently.

It's already a bit old but you can see an example demo form here: https://www.tenon-ui.info/forms-full-demo

cheers,
_mallory

On Wed, May 6, 2020, at 5:13 PM, Jared Smith wrote:
> I think <fieldset aria-required="true"> would be best. I'm not sure on
> the support for this yet. Also, the semantics seem a bit off because
> checkboxes inherently mean they can be checked or not, which means
> that they are not required, whereas aria-required on the fieldset
> means that something is required.
>
> Probably best of all is to ensure that this is clear in the text
> instructions, optimally in a fieldset legend, along with good error
> messaging and handling
>
> Jared
> > > > >

From: Birkir R. Gunnarsson
Date: Thu, May 07 2020 5:41AM
Subject: Re: required or aria required usage
← Previous message | Next message →

I did a more recent test and found much improved support for
aria-describedby on the fieldset (or group) element, pointing to the
error message, stuffing it into the <legend> no longer necessary.
I think adding "(check at least one)" to the <legend>, is the safest
bet, even if aria-required works it does not tell the whole story
(that checking at least one is required) and it's also something
non-screen reader users need to know.



On 5/7/20, Mallory < = EMAIL ADDRESS REMOVED = > wrote:
> At Tenon we wrestled with this for the Tenon UI.
>
> Unfortunately it's become a more popular UI component, a set of checkboxes
> where at least one must be checked but radios or a select cannot be used
> because users may check more.
>
> What we ended up with:
> - the legend adds either the word "required" (for radios) or "choose at
> least 1" (for checkboxes
> - resultant error messages stuffed inside the legend
>
> "aria-required" on the fieldset probably wouldn't have hurt, but we didn't
> do that. Maybe there wasn't enough AT support back then?
>
> Also, getting error messages to be both programmatically associated with the
> group and read out wasn't very doable cross-browser: stuffing error messages
> inot the legend worked the best, even though semantically we'd have
> preferred doing it differently.
>
> It's already a bit old but you can see an example demo form here:
> https://www.tenon-ui.info/forms-full-demo
>
> cheers,
> _mallory
>
> On Wed, May 6, 2020, at 5:13 PM, Jared Smith wrote:
>> I think <fieldset aria-required="true"> would be best. I'm not sure on
>> the support for this yet. Also, the semantics seem a bit off because
>> checkboxes inherently mean they can be checked or not, which means
>> that they are not required, whereas aria-required on the fieldset
>> means that something is required.
>>
>> Probably best of all is to ensure that this is clear in the text
>> instructions, optimally in a fieldset legend, along with good error
>> messaging and handling
>>
>> Jared
>> >> >> >> >>
> > > > >


--
Work hard. Have fun. Make history.

From: Sailesh Panchang
Date: Thu, May 07 2020 6:35AM
Subject: Re: required or aria required usage
← Previous message | No next message

If these are checkboxes where at least one needs to be checked, that
is essential info that all users need to know. These are surely not
radio buttons and the "required" property does not make sense in this
context. The native fieldset/legend method to convey this info is the
best. No need to use ARIA IMO. Conveying that at least one needs to be
checked via an error message too is not the best usability.
Thanks,
Sailesh


On 5/7/20, Birkir R. Gunnarsson < = EMAIL ADDRESS REMOVED = > wrote:
> I did a more recent test and found much improved support for
> aria-describedby on the fieldset (or group) element, pointing to the
> error message, stuffing it into the <legend> no longer necessary.
> I think adding "(check at least one)" to the <legend>, is the safest
> bet, even if aria-required works it does not tell the whole story
> (that checking at least one is required) and it's also something
> non-screen reader users need to know.
>
>
>
> On 5/7/20, Mallory < = EMAIL ADDRESS REMOVED = > wrote:
>> At Tenon we wrestled with this for the Tenon UI.
>>
>> Unfortunately it's become a more popular UI component, a set of
>> checkboxes
>> where at least one must be checked but radios or a select cannot be used
>> because users may check more.
>>
>> What we ended up with:
>> - the legend adds either the word "required" (for radios) or "choose at
>> least 1" (for checkboxes
>> - resultant error messages stuffed inside the legend
>>
>> "aria-required" on the fieldset probably wouldn't have hurt, but we
>> didn't
>> do that. Maybe there wasn't enough AT support back then?
>>
>> Also, getting error messages to be both programmatically associated with
>> the
>> group and read out wasn't very doable cross-browser: stuffing error
>> messages
>> inot the legend worked the best, even though semantically we'd have
>> preferred doing it differently.
>>
>> It's already a bit old but you can see an example demo form here:
>> https://www.tenon-ui.info/forms-full-demo
>>
>> cheers,
>> _mallory
>>
>> On Wed, May 6, 2020, at 5:13 PM, Jared Smith wrote:
>>> I think <fieldset aria-required="true"> would be best. I'm not sure on
>>> the support for this yet. Also, the semantics seem a bit off because
>>> checkboxes inherently mean they can be checked or not, which means
>>> that they are not required, whereas aria-required on the fieldset
>>> means that something is required.
>>>
>>> Probably best of all is to ensure that this is clear in the text
>>> instructions, optimally in a fieldset legend, along with good error
>>> messaging and handling
>>>
>>> Jared
>>> >>> >>> >>> >>>
>> >> >> >> >>
>
>
> --
> Work hard. Have fun. Make history.
> > > > >


--
Sailesh Panchang
Principal Accessibility Consultant
Deque Systems Inc
381 Elden Street, Suite 2000, Herndon, VA 20170
Mobile: 571-344-1765