File tree 1 file changed +23
-0
lines changed
1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ getByRole(
25
25
pressed?: boolean ,
26
26
suggest?: boolean ,
27
27
current?: boolean | string ,
28
+ disabled?: boolean ,
28
29
expanded?: boolean ,
29
30
queryFallbacks?: boolean ,
30
31
level?: number ,
@@ -184,6 +185,28 @@ you can get the "👍" button by calling `getByRole('button', { pressed: true })
184
185
To learn more about the pressed state see
185
186
[ ARIA ` aria-pressed ` ] ( https://www.w3.org/TR/wai-aria-1.2/#aria-pressed ) .
186
187
188
+ ### ` disabled `
189
+
190
+ You can filter elements by their disabled state by setting ` disabled: true ` or
191
+ ` disabled: false ` .
192
+
193
+ For example in
194
+
195
+ ``` html
196
+ <body >
197
+ <section >
198
+ <button disabled >Login</button >
199
+ <div role =" alert" aria-disabled =" false" >Failed to login</button >
200
+ </section >
201
+ </body >
202
+ ```
203
+
204
+ you can get the "Login" button by calling
205
+ ` getByRole('button', { disabled: true }) ` . To learn more about the disabled
206
+ state see
207
+ [ ARIA ` aria-disabled ` ] ( https://www.w3.org/TR/wai-aria-1.2/#aria-pressed ) and
208
+ [ MDN ` disabled ` attribute] ( https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled ) .
209
+
187
210
### ` suggest `
188
211
189
212
You can disable the ability to
You can’t perform that action at this time.
0 commit comments