E-mail List Archives
One of these <select> dropdowns is required, but not all
From: Henry, Michael (IntelliDyne)
Date: May 2, 2017 7:33AM
- Next message: Swift, Daniel P.: "headers based on DOM or manipulated DOM"
- Previous message: Veronika Jermolina: "Voice recognition participants"
- Next message in Thread: Birkir R. Gunnarsson: "Re: One of these
- Previous message in Thread: None
- View all messages in this Thread
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
- Next message: Swift, Daniel P.: "headers based on DOM or manipulated DOM"
- Previous message: Veronika Jermolina: "Voice recognition participants"
- Next message in Thread: Birkir R. Gunnarsson: "Re: One of these
- Previous message in Thread: None
- View all messages in this Thread