Skip to content

docs: add aria-query doc link to ByRole query #280

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

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion docs/dom-testing-library/api-queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,10 @@ Queries for elements with the given role (and it also accepts a
`<button />` has the `button` role without explicitly setting the `role`
attribute. The
[W3C HTML recommendation](https://www.w3.org/TR/html5/index.html#contents) lists
all HTML elements with their default aria roles.
all HTML elements with their default ARIA roles. Additionally, as DOM Testing
Library uses `aria-query` under the hood to find those elements by their default
ARIA roles, you can find in their docs
[which HTML Elements with inherent roles are mapped to each role](https://github.com/A11yance/aria-query#elements-to-roles).

If you set `hidden` to `true` elements that are normally excluded from the
accessibility tree are considered for the query as well. The default behavior
Expand Down