@@ -165,47 +165,47 @@ the "👎" by calling `getByRole('link', { current: false })`. To learn more abo
165
165
the current state see
166
166
[ ARIA ` aria-current ` ] ( https://www.w3.org/TR/wai-aria-1.2/#aria-current ) .
167
167
168
- ### ` pressed `
168
+ ### ` disabled `
169
169
170
- Buttons can have a pressed state. You can filter the returned elements by their
171
- pressed state by setting ` pressed: true ` or ` pressed : false` .
170
+ You can filter elements by their disabled state by setting ` disabled: true ` or
171
+ ` disabled : false` .
172
172
173
173
For example in
174
174
175
175
``` html
176
176
<body >
177
177
<section >
178
- <button aria-pressed = " true " >👍 </button >
179
- <button aria-pressed =" false" >👎 </button >
178
+ <button disabled >Login </button >
179
+ <div role = " alert " aria-disabled =" false" >Failed to login </button >
180
180
</section >
181
181
</body >
182
182
```
183
183
184
- you can get the "👍" button by calling ` getByRole('button', { pressed: true }) ` .
185
- To learn more about the pressed state see
186
- [ ARIA ` aria-pressed ` ] ( https://www.w3.org/TR/wai-aria-1.2/#aria-pressed ) .
184
+ you can get the "Login" button by calling
185
+ ` getByRole('button', { disabled: true }) ` . To learn more about the disabled
186
+ state see
187
+ [ ARIA ` aria-disabled ` ] ( https://www.w3.org/TR/wai-aria-1.2/#aria-pressed ) and
188
+ [ MDN ` disabled ` attribute] ( https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled ) .
187
189
188
- ### ` disabled `
190
+ ### ` pressed `
189
191
190
- You can filter elements by their disabled state by setting ` disabled: true ` or
191
- ` disabled : false` .
192
+ Buttons can have a pressed state. You can filter the returned elements by their
193
+ pressed state by setting ` pressed: true ` or ` pressed : false` .
192
194
193
195
For example in
194
196
195
197
``` html
196
198
<body >
197
199
<section >
198
- <button disabled >Login </button >
199
- <div role = " alert " aria-disabled =" false" >Failed to login </button >
200
+ <button aria-pressed = " true " >👍 </button >
201
+ <button aria-pressed =" false" >👎 </button >
200
202
</section >
201
203
</body >
202
204
```
203
205
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 ) .
206
+ you can get the "👍" button by calling ` getByRole('button', { pressed: true }) ` .
207
+ To learn more about the pressed state see
208
+ [ ARIA ` aria-pressed ` ] ( https://www.w3.org/TR/wai-aria-1.2/#aria-pressed ) .
209
209
210
210
### ` suggest `
211
211
0 commit comments