Replies: 1 comment 2 replies
-
|
Thanks for the feedback. This is already possible by injecting a custom implementation of With regards to testing-library, I wouldn't want to skip this check. You should instead not use the accessible name to query the element and use other queries like |
Beta Was this translation helpful? Give feedback.
2 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.
-
Hello,
I created the following repository showcasing performance issues with React Testing Library's
ByRolequeries: https://github.com/ptamarit/find-by-role-perfIt's using Material-UI's date picker v3, and the test is accessing date buttons by role and accessible name.
I'm already using
hidden: trueto bypass thegetComputedStylecall in DOM Testing Library.It improved performance, but it's still pretty bad.
The biggest time spent in the test is on
computeAccessibleName.It's particularly visible in the case of this calendar as there are 30+ buttons, meaning that accessible names needs to be computed for all of these buttons to find matches.
Half of the time spent on
computeAccessibleNameis spent on theisHiddenmethod.Which brings me to the following questions:
dom-accessibility-apiallowing to skip this hidden check?dom-testing-librarycould check ifByRoleis called withhidden: trueand pass it on todom-accessibility-api.Happy to hear your thoughts.
Cheers,
Pablo
Beta Was this translation helpful? Give feedback.
All reactions