File tree 1 file changed +22
-0
lines changed
1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ getByRole(
21
21
name?: TextMatch ,
22
22
description?: TextMatch ,
23
23
selected?: boolean ,
24
+ busy?: boolean ,
24
25
checked?: boolean ,
25
26
pressed?: boolean ,
26
27
suggest?: boolean ,
@@ -115,6 +116,27 @@ you can get the "Native"-tab by calling `getByRole('tab', { selected: true })`.
115
116
To learn more about the selected state and which elements can have this state
116
117
see [ ARIA ` aria-selected ` ] ( https://www.w3.org/TR/wai-aria-1.2/#aria-selected ) .
117
118
119
+ ### ` busy `
120
+
121
+ You can filter the returned elements by their busy state by setting ` busy: true `
122
+ or ` busy: false ` .
123
+
124
+ For example in
125
+
126
+ ``` html
127
+ <body >
128
+ <section >
129
+ <div role =" alert" aria-busy =" false" >Login failed</div >
130
+ <div role =" alert" aria-busy =" true" >Error: Loading message...</div >
131
+ </section >
132
+ </body >
133
+ ```
134
+
135
+ you can get the "Login failed" alert by calling
136
+ ` getByRole('alert', { busy: false }) ` . To learn more about the busy state see
137
+ [ ARIA ` aria-busy ` ] ( https://www.w3.org/TR/wai-aria-1.2/#aria-busy ) and
138
+ [ MDN ` aria-busy ` attribute] ( https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-busy ) .
139
+
118
140
### ` checked `
119
141
120
142
You can filter the returned elements by their checked state by setting
You can’t perform that action at this time.
0 commit comments