Closed lakshman0369 closed 1 year ago
I'm experiencing the same behaviour here.
For example I get this message:
TestingLibraryElementError: Unable to find an accessible element with the role "img"
Here are the accessible roles:
presentation:
Name "AD_TITLE":
<img
alt="AD_TITLE"
class="jsx-2547541157"
src="test-file-stub"
/>
So there is definitely an img
element there, but it's not detecting it. I am currently upgrading from 12 to 14.
This might be related to https://github.com/testing-library/dom-testing-library/issues/1235, we'll need to look into it. Can you please add more info about the queries you're running and the elements you're trying to query? Thank you.
Describe the bug
Image tagged element and combobox are not being detected by the getByRole query.
Aria-query previous working version - 5.1.3 Aria-query upgraded version version - 5.2.1 "@testing-library/react": "12.0.0"
<img src="/rcore/static/media/AccessDenied_Icon.db53e967.svg" alt="" class="sc-lmJFLr hLGeOl sc-jRBLiq ghkJEk" id="">
Previously before the 'aria-query' upgrade, getByRole query will detect the above element. But after the upgrade this query is not able to detect the above element.
We have many test cases that are breaking due to above issue . This behavior is happening since v5.2.1. Please fix the issue above issue.