Skip to content

Conversation

eps1lon
Copy link
Member

@eps1lon eps1lon commented Oct 13, 2019

What:

Addresses #379

Why:

Queries can be used when polling the DOM. If the query is slower than the polling rate we'll run into timeouts

How:

Since |elements| >> |elements with role| and getting the role is far less expensive than deciding if an element is part of the a11y tree it's far cheaper to query the elements for the role before checking if an element is part of the a11y tree.

Checklist:

@eps1lon eps1lon added the enhancement New feature or request label Oct 13, 2019
Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can definitely see how this could improve perf. Thank you!

@kentcdodds kentcdodds merged commit b5cb4c5 into testing-library:master Oct 13, 2019
@kentcdodds
Copy link
Member

Whoops! Didn't realize that this code isn't full covered by tests 😬

@kentcdodds kentcdodds mentioned this pull request Oct 13, 2019
4 tasks
@eps1lon
Copy link
Member Author

eps1lon commented Oct 13, 2019

Hm I wanted to see how this Codesandbox CI works. Guess I have to add a config anyway 😄

@kentcdodds
Copy link
Member

🎉 This PR is included in version 6.8.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@eps1lon eps1lon deleted the perf/isAccessible branch October 13, 2019 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants