From 6c246c812c17df0a377a6f6b326a107090da5623 Mon Sep 17 00:00:00 2001 From: Tim Fischbach Date: Tue, 23 Sep 2025 10:19:09 +0200 Subject: [PATCH] feat(ByRole): Treat inert subtrees as hidden in role queries See https://github.com/testing-library/dom-testing-library/pull/1366 --- docs/queries/byrole.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/queries/byrole.mdx b/docs/queries/byrole.mdx index 53ecd33be..506118794 100644 --- a/docs/queries/byrole.mdx +++ b/docs/queries/byrole.mdx @@ -89,7 +89,8 @@ 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 follows https://www.w3.org/TR/wai-aria-1.2/#tree_exclusion with the exception of `role="none"` and `role="presentation"` which are considered in the query in any -case. For example in +case. Elements in [`inert` subtrees](https://html.spec.whatwg.org/multipage/interaction.html#inert-subtrees) +are also considered hidden. For example in ```html