Skip to main content
Version: v6

A listbox that contains a group of options is missing a role group on the grouped options

A listbox that contains a group of options is missing a role group on the grouped options — rule summary
FieldValue
Rule codeManual_OptionGroup_Missing
WCAG conformance levelA
WCAG success criterion1.3.1 Info and Relationships
Must be fixed at sourceNo

Description

When a listbox contains grouped options, they are often referred to as an 'option group.' An option group must contain at least one option and requires an accessible name, provided via either an aria-label or aria-labelledby attribute. We detected grouped options that did not reflect proper grouping in the HTML. Therefore, ensure that when options are part of a group, they are contained within an element with a group role. Without accessible grouping, the order and functionality of options may be unclear to users utilizing screen readers.

How to fix

Ensure that each container denoting a group of options has an accessible name provided via an aria-label or aria-labelledby attribute. Additionally, ensure that the group of options is contained within an element with a role of "group".