File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ getByRole(
2121 name?: TextMatch ,
2222 description?: TextMatch ,
2323 selected?: boolean ,
24+ busy?: boolean ,
2425 checked?: boolean ,
2526 pressed?: boolean ,
2627 suggest?: boolean ,
@@ -115,6 +116,27 @@ you can get the "Native"-tab by calling `getByRole('tab', { selected: true })`.
115116To learn more about the selected state and which elements can have this state
116117see [ ARIA ` aria-selected ` ] ( https://www.w3.org/TR/wai-aria-1.2/#aria-selected ) .
117118
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+
118140### ` checked `
119141
120142You can filter the returned elements by their checked state by setting
You can’t perform that action at this time.
0 commit comments