fix: propagate hidden flag to computeAccessibleName#1371
fix: propagate hidden flag to computeAccessibleName#1371foxaltus wants to merge 2 commits intotesting-library:mainfrom
Conversation
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 9bc828e:
|
|
Hmm I realize this is not enough... The changes allow to bypass the expensive See: most time is being spent in |
|
Uh oh! @foxaltus, the image you shared is missing helpful alt text. Check #1371 (comment). Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image. Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs. |
|
At this point I think that maybe If this sounds too much of a bazooka solution, maybe we should instead consider adding an option at
Thoughts? |

What: this PR fixes #820 (comment)
Why: *ByRole APIs are slow, because the DOM environment relies on
getComputedStylesto compute elements visibility. This can be mitigated by using the{ hidden: true }option. However, when using *ByRole APIs along with thenameoption, the performance toll is still being paid becausecomputeAccessibleNameis called internally, which does not currently ignore hidden elements.How: this PR propagates the
hiddenoption tocomputeAccessibleName, which avoids paying the performance toll.Checklist:
docs site