user-event
user-event copied to clipboard
feat(keyboard): support shadow DOM in tab order
What:
Consider focusable elements in shadow trees.
Why: #1026
Checklist:
- [x] Tests
- [ ] Ready to be merged
on top of #1038 -- should be rebased once that is merged
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 77563745622a1be6e18772da0aa85650fd379e69:
| Sandbox | Source |
|---|---|
| userEvent-dom | Configuration |
| userEvent-react | Configuration |
Changes to be reviewed here: https://github.com/testing-library/user-event/pull/1040/commits/b3222206f7b4c8dd66d01955be47cdb2f71dd8a4..HEAD
Codecov Report
Merging #1040 (7756374) into main (1aa2027) will not change coverage. The diff coverage is
100.00%.
@@ Coverage Diff @@
## main #1040 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 88 87 -1
Lines 2061 2099 +38
Branches 691 713 +22
=========================================
+ Hits 2061 2099 +38
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/clipboard/copy.ts | 100.00% <100.00%> (ø) |
|
| src/clipboard/cut.ts | 100.00% <100.00%> (ø) |
|
| src/clipboard/paste.ts | 100.00% <100.00%> (ø) |
|
| src/event/behavior/click.ts | 100.00% <100.00%> (ø) |
|
| src/event/behavior/keydown.ts | 100.00% <100.00%> (ø) |
|
| src/event/focus.ts | 100.00% <100.00%> (ø) |
|
| src/event/selection/updateSelectionOnFocus.ts | 100.00% <100.00%> (ø) |
|
| src/utils/focus/focusable.ts | 100.00% <100.00%> (ø) |
|
| src/utils/focus/getActiveElement.ts | 100.00% <100.00%> (ø) |
|
| src/utils/focus/getTabDestination.ts | 100.00% <100.00%> (ø) |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
@Christian24 This should complete support for focus handling on shadow DOM
Thanks @ph-fritsche! Really looking forward to seeing this in the next release.
@ph-fritsche @Christian24 is there anything that can be done to get this, #1038 and #1033 back on the table? I would be glad to help or find someone from my team who can.
I would love to get this merged. I think @ph-fritsche wanted to finish work on #1019 first though. I could potentially use this for something else I have been working on myself too. I am not a maintainer here though, so I cannot really comment on their goals.