-
Notifications
You must be signed in to change notification settings - Fork 470
getByRole() doesn't recognize header's implicit banner role #578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Just complementing:
If you follow the link, you'll see that aria-query doesn't actually support any landmark roles, which seems to be the issue. |
Thanks for the information, I've created an issue in the aria-query project. It looks as if there is a huge PR being verified that brings landmark support. |
Nice find! I came here for the same problem, so I'm hoping this happens soon. |
I've updated |
The latest [aria-query version](https://github.com/A11yance/aria-query/releases/tag/v4.2.2) fixes the issue of failing to recognize `<header>` as a `banner` role. Fixes: testing-library#578
The latest [aria-query version](https://github.com/A11yance/aria-query/releases/tag/v4.2.2) fixes the issue of failing to recognize `<header>` as a `banner` role. Fixes: #578
🎉 This issue has been resolved in version 7.16.3 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
@testing-library/dom
version:7.5.1
@testing-library/jest-dom
:5.7.0
@testing-library/react
:10.0.4
jest
:24.9.0
Relevant code or config:
What you did:
The
header
tag has an implicitbanner
role. RTL'sgetByRole
should be able to identify this.What happened:
Problem description:
From the official W3C specs:
header
element defines abanner
landmark when its context is thebody
element.header
element is not considered abanner
landmark when it is descendant of any of following elements:article
aside
main
nav
section
Chrome gets this one right:
Suggested solution:
RTL should be able to identify the role correctly with respect to the above
banner
specs for theheader
tag.The text was updated successfully, but these errors were encountered: