From cc51bb2b743e0bea97eb15ec751d1d426d313661 Mon Sep 17 00:00:00 2001
From: Ren Adachi <49895682+moeyashi@users.noreply.github.com>
Date: Mon, 19 Aug 2024 10:54:36 +0900
Subject: [PATCH 1/2] docs(byrole.mdx): add tips for input type password
---
docs/queries/byrole.mdx | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/docs/queries/byrole.mdx b/docs/queries/byrole.mdx
index 7c70db2f7..ece4b2210 100644
--- a/docs/queries/byrole.mdx
+++ b/docs/queries/byrole.mdx
@@ -73,6 +73,14 @@ not replace the functionality of these attributes. For example
its description if `fancy.jpg` could not be loaded. Whether you want to assert
this functionality in your test or not is up to you.
+:::tip input type password
+
+Use [ByLabelText](queries/bylabeltext.mdx) to select ``.
+
+This input type doesn't have the textbox role.
+
+:::
+
## Options
### `hidden`
From 4dd68cb3709f9d370da1936243c6ca0dc51d0cd9 Mon Sep 17 00:00:00 2001
From: Ren Adachi <49895682+moeyashi@users.noreply.github.com>
Date: Mon, 19 Aug 2024 18:50:18 +0900
Subject: [PATCH 2/2] fix(byrole.mdx): for better explanation
see #1410
---
docs/queries/byrole.mdx | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/docs/queries/byrole.mdx b/docs/queries/byrole.mdx
index ece4b2210..edccdb484 100644
--- a/docs/queries/byrole.mdx
+++ b/docs/queries/byrole.mdx
@@ -75,9 +75,7 @@ this functionality in your test or not is up to you.
:::tip input type password
-Use [ByLabelText](queries/bylabeltext.mdx) to select ``.
-
-This input type doesn't have the textbox role.
+Unfortunately, the spec defines that `` has no implicit role. This means that in order to query this type of element we must fallback to a less powerful query such as `[ByLabelText](queries/bylabeltext.mdx)`.
:::