Skip to content

Commit 63cd4a2

Browse files
authored
fix(queries): use role img instead of image (#994)
use `img` instead of `image` since `image` is not a valid aria-role.
1 parent 38a24c9 commit 63cd4a2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/queries/byrole.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ accessible name query does not replace other queries such as `*ByAlt` or
6262
`*ByTitle`. While the accessible name can be equal to these attributes, it does
6363
not replace the functionality of these attributes. For example
6464
`<img aria-label="fancy image" src="fancy.jpg" />` will be returned for both
65-
`getByAltText('fancy image')` and `getByRole('image', { name: 'fancy image' })`.
65+
`getByAltText('fancy image')` and `getByRole('img', { name: 'fancy image' })`.
6666
However, the image will not display its description if `fancy.jpg` could not be
6767
loaded. Whether you want to assert this functionality in your test or not is up
6868
to you.

0 commit comments

Comments
 (0)