web.dev
web.dev copied to clipboard
content: Use of the word "children"
What page(s) need to be updated?
https://web.dev/aria-required-children/
Why is this update needed?
I believe the use of the word "children" is implying something the specs do not. The w3.org wai-aria 1.1 spec says that [role=radio]
elements must be "enclosed" by an element with role radiogroup
. To me, this means they can be descendants, and not necessarily direct child elements. I don't see anything in the spec that says there cannot be intervening parentage. Indeed, with input[type=radio], the inputs do not need to be siblings, but could instead be enclosed in separate labels, list-items, etc., with their group's name virtually enclosing them all anyway.
Lighthouse is reducing the accessibility score if the radio elements are not siblings that are directly children (i.e. in the first level within) the radiogroup. This severely and unnecessarily limits the ability to use those roles, and doesn't seem to be indicated or even implied by the spec.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. To prevent this from happening, leave a comment.
Closing this - cannot replicate, redirects to [https://dequeuniversity.com/rules/axe/4.4/aria-required-children](https://dequeuniversity.com/rules/axe/4.4/aria-required-children