Skip to content
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

Add type support for {home} and {end} #536

Merged
merged 4 commits into from
Feb 11, 2021

Conversation

curiosity26
Copy link
Contributor

What: I've added support for typing the Home and End keys

Why: Per aria-role spec for listbox, Home and End are necessary inputs that need to be handled and tested. Not only that, it's common in textbox input, so why not, right?
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/listbox_role

How: Since Home and End are navigation keys, I added to the existing navigationKeys function to support Home and End and ensured cursor functionality worked as intended.

Checklist:

  • Documentation
  • Tests
  • Typings
  • Ready to be merged

@codecov
Copy link

codecov bot commented Dec 30, 2020

Codecov Report

Merging #536 (4437894) into master (b4330c4) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #536   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           13        13           
  Lines          692       696    +4     
  Branches       216       218    +2     
=========================================
+ Hits           692       696    +4     
Impacted Files Coverage Δ
src/type.js 100.00% <ø> (ø)
src/keys/navigation-key.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b4330c4...8f3cd01. Read the comment docs.

Comment on lines 6 to 11
Home: {
keyCode: 35,
},
End: {
keyCode: 36,
},
Copy link
Collaborator

Choose a reason for hiding this comment

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

Following keycode.info's table, those keys are inverted is it right?
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@luistak I've corrected the blunder.

@curiosity26
Copy link
Contributor Author

curiosity26 commented Jan 9, 2021 via email

@audiolion
Copy link

Who makes the call to merge? This has been hanging out in approved for a while.

@kentcdodds
Copy link
Member

I'm no longer an active maintainer. Any maintainer is welcome to merge a PR if you feel like it's a good direction. If you run into issues, let me know.

@kentcdodds

This comment has been minimized.

@kentcdodds
Copy link
Member

Just gave you merge access 👍

@nickserv nickserv merged commit 808c550 into testing-library:master Feb 11, 2021
@testing-library testing-library deleted a comment from kentcdodds Feb 11, 2021
@github-actions
Copy link

🎉 This PR is included in version 12.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@nickserv
Copy link
Member

@all-contributors add @curiosity26 for code

@allcontributors
Copy link
Contributor

@nickmccurdy

I've put up a pull request to add @curiosity26! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support {home} and {end} in type()
6 participants