We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getByRole('deletion')
<s>
@testing-library/dom
I believe this is framework/environment agnostic as the same happens using @storybook/test.
@storybook/test
// React Component const StrikethroughText = () => <s>Strikethrough Text</s> // Test File screen.getByRole('deletion')
Attempted to use a getByRole query to target an <s> element.
getByRole
An error was thrown that an element could not be found.
https://github.com/tomalexhughes/dom-testing-issue
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.
s
deletion
However, *ByRole queries only find the element if the role is explicitly set.
*ByRole
The text was updated successfully, but these errors were encountered:
No branches or pull requests
@testing-library/dom
version: 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
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 ofdeletion
, 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:
The text was updated successfully, but these errors were encountered: