E-mail List Archives
Re: One of these <select> dropdowns is required, but not all
From: Birkir R. Gunnarsson
Date: May 3, 2017 12:35PM
- Next message: Bhaskarjyoti Hazarika: "Query on Text resizing (1.4.4)"
- Previous message: James Crone: "Accessibility and 360 degree images"
- Next message in Thread: Henry, Michael (IntelliDyne): "Re: One of these
- Previous message in Thread: Henry, Michael (IntelliDyne): "One of these
- View all messages in this Thread
In my experience aria-required does not work on fieldsets (it does
work on role="radiogroup"), but it's been awhile since I tested.
Do you give sighted users any indication that they have to select from
at least one of the dropdowns?
If so, and if you do it in a legend for a fieldset or just in
instructional test on the form, I'd say that's sufficient.
Another thing you could do is to use the HTML required attribute on
all <select> elements in the section, and have JavaScript remove it
once user has selected from one of them.
It iss a bit of a hack, and you'd have to test it, but it has the
advantage that you are giving all users info and realtime feedback.
On 5/2/17, Henry, Michael (IntelliDyne) < <EMAIL REMOVED> > wrote:
> Hello, all.
>
> We have a form in which one section has a series of dropdown menus (HTML
> <select> tags). The user must choose an <option> from one of the <select>
> items in this section: either "State" or "ZIP code" or "Locality" or "Zone",
> etc.
>
>
> Essentially, the entire section is required, but not each individual
> <select>.
>
>
> I thought I might wrap the section in a <fieldset> with "aria-required=true"
> applied, and provide instructions in the <legend> ("Please select either
> 'State' or 'ZIP code' or ..."). This explanation is also in non-label text
> on the page, for sighted users.
>
>
> CSS is then used to visually hide the fieldset and legend (they are
> absolutely positioned off-screen). I use this technique for radio button
> groups already, to give them context.
>
>
> Does this seem like a reasonable approach, or do I need to do more with
> aria-required or some other tag/attribute?
>
>
> Thanks,
>
> Mike
>
>
> > > > >
--
Work hard. Have fun. Make history.
- Next message: Bhaskarjyoti Hazarika: "Query on Text resizing (1.4.4)"
- Previous message: James Crone: "Accessibility and 360 degree images"
- Next message in Thread: Henry, Michael (IntelliDyne): "Re: One of these
- Previous message in Thread: Henry, Michael (IntelliDyne): "One of these
- View all messages in this Thread