@testing-library/dom version: 10.4.0
- Testing Framework and version: jest 28.1.3
- DOM Environment: jsdom 16.7.0
I believe this is framework/environment agnostic as the same happens using @storybook/test.
Relevant code or config:
// React Component
const StrikethroughText = () => <s>Strikethrough Text</s>
// Test File
screen.getByRole('deletion')
What you did:
Attempted to use a getByRole query to target an <s> element.
What happened:
An error was thrown that an element could not be found.
Reproduction:
https://github.com/tomalexhughes/dom-testing-issue
Problem description:
The HTML ARIA spec states an s element has an implicit role of deletion, and it is not recommended to add this as an explicit role.
However, *ByRole queries only find the element if the role is explicitly set.
Suggested solution:
@testing-library/domversion: 10.4.0I believe this is framework/environment agnostic as the same happens using
@storybook/test.Relevant code or config:
What you did:
Attempted to use a
getByRolequery to target an<s>element.What happened:
An error was thrown that an element could not be found.
Reproduction:
https://github.com/tomalexhughes/dom-testing-issue
Problem description:
The HTML ARIA spec states an
selement has an implicit role ofdeletion, and it is not recommended to add this as an explicit role.However,
*ByRolequeries only find the element if the role is explicitly set.Suggested solution: