A Menu Item, Menu Item Radio or Menu Item Checkbox ARIA role is missing a required parent element of Menu
| Field | Value |
|---|---|
| Rule code | Menuitem_ParentRequirement_Missing |
| WCAG conformance level | A |
| WCAG success criterion | 4.1.2 Name, Role, Value |
| Must be fixed at source | No |
Description
Menu item ARIA roles, Menu item radio ARIA roles and Menu item checkbox ARIA Roles require a parent element that has a role of Menu in order for Assistive Technologies to correctly interpret their relationship. Ensure that all menu item radio role elements and menu item checkbox role elements are placed within a menu aria role container or parent element. View the W3 details on these components here: https://www.w3.org/TR/wai-aria-1.1/#menuitemradio and https://www.w3.org/TR/wai-aria-1.1/#menuitemcheckbox and https://www.w3.org/TR/wai-aria-1.1/#menuitem.
How to fix
Ensure that elements with role='menuitemradio' or role='menuitemcheckbox' or role='menuitem' are correctly nested within an element with role='menu', for example: <ul role='menu'><li role='menuitemradio'></li></ul>.