-
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 Home and End key events #523
Conversation
Codecov Report
@@ Coverage Diff @@
## master #523 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 13 13
Lines 675 685 +10
Branches 211 211
=========================================
+ Hits 675 685 +10
Continue to review full report at Codecov.
|
Thank you! |
I noticed this after creating #537. Sorry for the dupe. But I noticed this implementation doesn't encapsulate cursor positioning. FWIW I do handle cursor positioning with home and end in my PR |
Closing this as resolved by #536 |
Does 0d74a58 contain the missing changes? |
@nickmccurdy @bozdoz Could you confirm so that I could push it to master or add missing parts to it? |
What:
Add support for Home and End keys to
userEvent.type
Why:
Useful for accessibility tests for a Tabs component for example (home and end move focus to first and last elements): https://www.w3.org/TR/wai-aria-practices-1.1/examples/tabs/tabs-1/tabs.html
How:
I modelled the changes after #511, adding two functions
handleHome
andhandleEnd
, two tests, and updated the READMEChecklist: