Skip to content

Commit 6c246c8

Browse files
authored
feat(ByRole): Treat inert subtrees as hidden in role queries
See testing-library/dom-testing-library#1366
1 parent 9ae8c03 commit 6c246c8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/queries/byrole.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ If you set `hidden` to `true` elements that are normally excluded from the
8989
accessibility tree are considered for the query as well. The default behavior
9090
follows https://www.w3.org/TR/wai-aria-1.2/#tree_exclusion with the exception of
9191
`role="none"` and `role="presentation"` which are considered in the query in any
92-
case. For example in
92+
case. Elements in [`inert` subtrees](https://html.spec.whatwg.org/multipage/interaction.html#inert-subtrees)
93+
are also considered hidden. For example in
9394

9495
```html
9596
<body>

0 commit comments

Comments
 (0)