Skip to content

fix(queries): use role img instead of image#994

Merged
MatanBobi merged 1 commit intotesting-library:mainfrom
Dennis273:pr/fix-by-role-typo
Jan 25, 2022
Merged

fix(queries): use role img instead of image#994
MatanBobi merged 1 commit intotesting-library:mainfrom
Dennis273:pr/fix-by-role-typo

Conversation

@Dennis273
Copy link
Copy Markdown
Contributor

Use img instead of image since image is not a valid aria-role.

For example <img aria-label="fancy image" src="fancy.jpg" /> will be returned for both getByAltText('fancy image') and getByRole('image', { name: 'fancy image' }).

use `img` instead of `image` since `image` is not a valid aria-role.
Copy link
Copy Markdown
Member

@MatanBobi MatanBobi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks @Dennis273!

@MatanBobi MatanBobi merged commit 63cd4a2 into testing-library:main Jan 25, 2022
@MatanBobi
Copy link
Copy Markdown
Member

@all-contributors please add @Dennis273 for docs :)

@allcontributors
Copy link
Copy Markdown
Contributor

@MatanBobi

I've put up a pull request to add @Dennis273! 🎉

@Dennis273 Dennis273 deleted the pr/fix-by-role-typo branch January 25, 2022 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants