Skip to content

Commit 6aa5dc5

Browse files
thefalkedGiuliano Crivelli
and
Giuliano Crivelli
authored
docs: improve example of query/byrole #current (#1332)
Co-authored-by: Giuliano Crivelli <[email protected]>
1 parent a54a968 commit 6aa5dc5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/queries/byrole.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -181,13 +181,13 @@ For example in
181181
```html
182182
<body>
183183
<nav>
184-
<a href="current/page" aria-current="true">👍</a>
184+
<a href="current/page" aria-current="page">👍</a>
185185
<a href="another/page">👎</a>
186186
</nav>
187187
</body>
188188
```
189189

190-
you can get the "👍" link by calling `getByRole('link', { current: true })` and
190+
you can get the "👍" link by calling `getByRole('link', { current: 'page' })` and
191191
the "👎" by calling `getByRole('link', { current: false })`. To learn more about
192192
the current state see
193193
[ARIA `aria-current`](https://www.w3.org/TR/wai-aria-1.2/#aria-current).

0 commit comments

Comments
 (0)