Closed
Description
@testing-library/dom
version: 9.3.4@testing-libraray/react
version: 14.2.1- Testing Framework and version:
jest
27.5.1 - DOM Environment:
jsdom
16.7.0
Relevant code or config:
What you did:
Marking up insertions and deletions using the semantic <ins>
and <del>
tags and creating assertions to getByRole
those semantic elements
What happened:
getByRole('insertion')
and getByRole('deletion')
throw an error that no accessible roles were found.
Reproduction:
https://github.com/rdwoodring/react-testing-library-ins-del
Problem description:
According to the W3C documentation linked by the testing library docs, <del>
and <ins>
should have implicit roles of deletion
and insertion
, respectively. When adding the role
explicitly (which is expressly not recommended in the very same W3C documentation), the elements are found correctly.
Suggested solution:
Metadata
Metadata
Assignees
Labels
No labels