Replies: 1 comment 3 replies
-
The order of importance is:
It might just be that the browser calculation is wrong. There are multiple ways you can help resolve this issue:
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Originally reported in testing-library/dom-testing-library#903 (comment) by @nandastone
@testing-library/reactversion: 9.2.0Relevant code or config:
Test output:
What you did:
Attempt to select a column heading by role, using the element text as the accessible name.
What happened:
react-testing-librarydetermines the accessible name as thetitleattribute of the<span />element wrapping the element text. Testing across various browsers determines the accessible name should in fact be the element text.Reproduction:
https://codesandbox.io/s/react-testing-library-demo-forked-1xe1w
Problem description:
I wrap my column headings in
<span title="" />to provide tooltips. Instead of selecting the column heading by the text visible to the end user, I need to use tooltip text which is not yet visible.Suggested solution:
Mirror browser calculation of the accessible name, or at least provide a way to configure how the
nameis matched inbyRole().Beta Was this translation helpful? Give feedback.
All reactions