E-mail List Archives
Re: required or aria required usage
From: Birkir R. Gunnarsson
Date: May 7, 2020 5:41AM
- Next message: Birkir R. Gunnarsson: "Re: Non-dynamic alerts in web page"
- Previous message: Sumit Patel: "Re: Non-interactive elements"
- Next message in Thread: Sailesh Panchang: "Re: required or aria required usage"
- Previous message in Thread: Mallory: "Re: required or aria required usage"
- View all messages in this Thread
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 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.
- Next message: Birkir R. Gunnarsson: "Re: Non-dynamic alerts in web page"
- Previous message: Sumit Patel: "Re: Non-interactive elements"
- Next message in Thread: Sailesh Panchang: "Re: required or aria required usage"
- Previous message in Thread: Mallory: "Re: required or aria required usage"
- View all messages in this Thread