[aria-required-parent] invalid false positive
See original GitHub issueExpectation: HTML here passes just fine
Actual: does not pass .toHaveNoVioliations
through jest-axe
:
Motivation:
HTML spec says:
Authors MUST ensure that menu item radios are owned by an element with role group, menu, or menubar in order to identify that they are related widgets. Authors MAY separate menu items into sets by use of a separator or an element with an equivalent role from the native markup language. If a menu or menubar contains more than one group of menuitemradio elements, or if the menu contains one group and other, unrelated menu items, authors SHOULD nest each set of related menuitemradio elements in an element using the group role, and authors SHOULD delimit the group from other menu items with an element using the separator role.
given html matches the 2nd case:
menu
contains more than one group ofmenuitemradio
elements- (…) other, unrelated menu items, authors SHOULD nest each set of related menuitemradio elements in an element using the group role
- (…) and authors SHOULD delimit the group from other menu items with an element using the separator role
- div role menu
- div role group
- button role menuitemradio
- button role menuitemradio
- hr, implicit role separator (making it explicit doesnt change anything fwiw)
- a role menuitem
- minimum reproduction
- validates fine here as valid html, not sure if that checks for aria beyond redundancy though
- it worked fine before v4.0, so I presume something in this commit here broke
- removing
div role group
fixes it. adding a second group around the solo menuitem anchor on bottom also highlights this one as broken
axe-core version: 4.0.2
~~axe-webdriver, extension or other integration version: X.Y.Z~~
Browser and Assistive Technology versions
For Tooling issues:
- Node version: 14.7.0XX
- Platform: Win10
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (5 by maintainers)
Top GitHub Comments
That’s it. Adding
'group'
to the array is the entire pr.Yep, seems our standard object is missing
group
from required context of menuitemradio