-
Notifications
You must be signed in to change notification settings - Fork 249
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
Support 'Enter' key press on links #534
Conversation
Codecov Report
@@ Coverage Diff @@
## master #534 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 13 13
Lines 696 699 +3
Branches 218 221 +3
=========================================
+ Hits 696 699 +3
Continue to review full report at Codecov.
|
I suggest to edit this instead of the util: Line 582 in 287e5b8
if (isClickable(currentElement()) || isInstanceofElement(currentElement(), 'HTMLAnchorElement')) { (Maybe slap some comment on |
287e5b8
to
da153f6
Compare
@ph-fritsche Thanks for the feedback! I think I've addressed everything. |
@all-contributors add @benadamstyles for code, tests |
I've put up a pull request to add @benadamstyles! 🎉 |
🎉 This PR is included in version 12.7.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
What: in
handleEnter
, there is currently a check for whether the element is clickable, and if it is, it fires a click event on that element. This PR includes anchor tags (with truthyhref
values) in that check.Why: anchor tags are incorrectly missed out of this logic – browsers fire click events on anchor tags when they are focused and the user presses the
Enter
key.How: included anchor tags in the
isClickable
util function.Checklist:
DocumentationN/ATypingsN/A