-
Notifications
You must be signed in to change notification settings - Fork 471
fix: Don't recommend ByRole if role is generic
#664
New issue
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
fix: Don't recommend ByRole if role is generic
#664
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 0120a91:
|
d406b48
to
0120a91
Compare
Codecov Report
@@ Coverage Diff @@
## master #664 +/- ##
===========================================
+ Coverage 99.65% 100.00% +0.34%
===========================================
Files 24 24
Lines 582 583 +1
Branches 149 149
===========================================
+ Hits 580 583 +3
+ Misses 2 0 -2
Continue to review full report at Codecov.
|
generic
@@ -74,7 +74,9 @@ test(`should not suggest if the suggestion would give different results`, () => | |||
}) | |||
|
|||
test('should suggest by label over title', () => { | |||
renderIntoDocument(`<label><span>bar</span><input title="foo" /></label>`) | |||
renderIntoDocument( | |||
`<label><span>bar</span><input type="password" title="foo" /></label>`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be accurate: The spec related to aria didn't change. This was a bug in earlier versions of aria-query
. <input />
with no or an invalid type
attribute is always considered <input type="text" />
which is a role="textbox"
.
🎉 This PR is included in version 7.16.3 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
@marcosvega91, and all reviewers... You are my heros! I really didn't have time to work on this. Thank you! |
🎉 This issue has been resolved in version 7.17.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
fix #663
What:
I have fixed all the tests that failed
Why:
Because after the update of
aria-query
something didn't workHow:
I have made two changes in this PR:
With the new aria specifications
input
without a role has atextbox
as default one.I' have replaced all the input used in tests that not require a role with input of
type=password
that doesn't have adefault role @benmonro
I have skipped generic role because we prefer to suggest others query
we prefer
screen.getByText(/bob/i)
instead ofscreen.getByRole('generic', {name: /bob/i})
Checklist:
docs site