aria-practices icon indicating copy to clipboard operation
aria-practices copied to clipboard

Provide example for required grouping

Open jnurthen opened this issue 7 years ago • 1 comments

Based on old tracker ACTION-962 https://www.w3.org/WAI/ARIA/track/actions/962

which came from the following issue - https://www.w3.org/WAI/PF/Group/track/issues/443

Description: The ARIA role of group should be allowed to have a property of aria-required. I have a couple of use cases where this would be needed when at least one input element in a group must be selected or filled in by the user to complete the input needed in the form.

The first example is a group of checkboxes, such as one you markup with HTML-fieldset or as an aria role of group. What if the the user must select at least one checkbox in the group for the form to be considered complete? You need a programmatic way to mark this group as required because at least one selection must be made. Without an aria-required role, you must add the text '* (select one or more)' to the fieldset text, but that is not a programmatic indicator that it is required.

The second example is a search mechanism where you have multiple fields that are used to fill in the search criteria. These could be any type of input method, entry field, combo box, whatever. At least one of the fields must be filled in to perform a search. Right now there is no way to mark this up with ARIA. You instead must do form validation and display an error message to inform the user that they didn't fill in any search criteria.

jnurthen avatar Apr 11 '18 16:04 jnurthen

Related to issue #252.

mcking65 avatar Apr 16 '18 19:04 mcking65