Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6aa5dc5

Browse files
thefalkedGiuliano Crivelli
and
Giuliano Crivelli
authored
docs: improve example of query/byrole #current (#1332)
Co-authored-by: Giuliano Crivelli <giuliano.crivelli@byside.com>
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‎

Lines changed: 2 additions & 2 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /