Skip to content

Commit b5c63d9

Browse files
authored
fix wrong role (#1251)
1 parent 6cd8904 commit b5c63d9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/queries/byrole.mdx

+4-4
Original file line numberDiff line numberDiff line change
@@ -351,12 +351,12 @@ To learn more about the `aria-level` property, see
351351
352352
### `value`
353353

354-
A range widget can be queried by any value `getByRole('heading')` or by a
354+
A range widget can be queried by any value `getByRole('spinbutton')` or by a
355355
specific value using the `level` option
356356
`getByRole('spinbutton', { value: { now: 5, min: 0, max: 10, text: 'medium' } })`.
357357

358358
Note that you don't have to specify all properties in `value`. A subset is
359-
sufficient e.g. `getByRole('heading', { value: { now: 5, text: 'medium' } })`.
359+
sufficient e.g. `getByRole('spinbutton', { value: { now: 5, text: 'medium' } })`.
360360

361361
Given the example below,
362362

@@ -388,10 +388,10 @@ Given the example below,
388388
you can query specific spinbutton(s) with the following queries,
389389

390390
```js
391-
getByRole('heading', {value: {now: 5}})
391+
getByRole('spinbutton', {value: {now: 5}})
392392
// <button>Volume</button>
393393

394-
getAllByRole('heading', {value: {min: 0}})
394+
getAllByRole('spinbutton', {value: {min: 0}})
395395
// [
396396
// <button>Volume</button>,
397397
// <button>Pitch</button>

0 commit comments

Comments
 (0)