Support for landmark roles
darekkay opened this issue · comments
Hello,
as described in this issue from dom-testing-library
, the <header>
element role is not identified correctly. According to the specs, the implicit role for <header>
is banner
.
As noticed by @OCmilo, aria-query
does not handle any landmark roles. Is there a plan to support them? I could also have a look into this.
Sorry, I should have checked the PRs in more detail first. It seems to be addressed in #46 already. Looking forward to it!
@jessebeach thanks for all the hard work! However, the issue is still reproducable. The banner role file does not include any header
reference. It should work similar to contentinfo, but with slightly different constraints:
- The HTML
header
element defines abanner
landmark when its context is thebody
element. - The HTML
header
element is not considered abanner
landmark when it is descendant of any of following elements:
article
aside
main
nav
section
I think this line is the main problem - it should be header
instead of banner
, then the mapping works correctly. However, the other constraints have to be added to fully fulfil the ARIA specs. This requires much more work, though.
Can you please re-open the issue?