Repository navigation
Bump cypress-plugin-tab to 2.0.0 - #3592
Merged
Merged
Conversation
2.0.0 changed what `.tab()` does when the page cancels the Tab keydown: it now refocuses the element the Tab started from, where 1.x and real browsers keep whatever the page's handler focused. Shepherd's focus trap cancels Tab and moves focus itself to wrap around the dialog, so the five a11y tests that wrap failed. A pnpm patch restores the 1.x behavior on that path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
Coverage Impact This PR will not change total coverage. Commit a15332e · 🚦 See full report on Qlty Cloud »🛟 Help
|
Merged
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Supersedes #3413.
Problem
cypress-plugin-tab 2.0.0 changed what
.tab()does when the page cancels the Tab keydown. It now moves focus back to the element the Tab started from. 1.x and real browsers keep whatever the page's handler focused.Shepherd's focus trap (
trapTabinshepherd-element.ts) cancels Tab and moves focus itself to wrap around the dialog and its target. On 2.0.0, the five a11y tests that check wrap-around failed: 9 of 14 passed, against 14 of 14 on 1.0.5.This is upstream issue kuceb/cypress-plugin-tab#67, and kuceb/cypress-plugin-tab#73 has an open fix.
Change
cypress-plugin-tabto^2.0.0. The support file and.tab()calls need no changes.patches/cypress-plugin-tab@2.0.0.patch, a one-line pnpm patch that keeps the page's focus after a cancelled keydown, as 1.x did. It's registered inpnpm-workspace.yaml. It's tied to exactly 2.0.0, so pnpm refuses to install if the version changes, which forces a recheck. Drop it once Memory leak due to one lost tether instance #73 is released.Cypress's built-in
cy.press()can't replace the plugin because it has no Shift+Tab.Verification
Full Cypress suite in Chrome: 62 of 62 pass.
🤖 Generated with Claude Code