Skip to content

Bump cypress-plugin-tab to 2.0.0 - #3592

Merged
RobbieTheWagner merged 1 commit into
mainfrom
cypress-plugin-tab-v2
Nov 10, 2026
Merged

RobbieTheWagner merged 1 commit into
mainfrom
cypress-plugin-tab-v2

Conversation

@RobbieTheWagner

Copy link
Copy Markdown
Member

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 (trapTab in shepherd-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

  • Bump cypress-plugin-tab to ^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 in pnpm-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

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>
@RobbieTheWagner RobbieTheWagner added dependencies Pull requests that update a dependency file internal labels Nov 10, 2026
@vercel

vercel Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
shepherd-docs Ready Ready Preview Nov 10, 2026 7:25pm UTC
shepherd-landing Ready Ready Preview Nov 10, 2026 7:25pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@qltysh

qltysh Bot commented Nov 10, 2026

Copy link
Copy Markdown

Qlty


Coverage Impact

This PR will not change total coverage.

Commit a15332e · 🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

@RobbieTheWagner
RobbieTheWagner merged commit 85e4e76 into main Nov 10, 2026
9 of 12 checks passed
@RobbieTheWagner
RobbieTheWagner deleted the cypress-plugin-tab-v2 branch November 10, 2026 19:27
@github-actions github-actions Bot mentioned this pull request Nov 10, 2026

This branch was successfully deployed

2 active deployments
Preview – shepherd-landing — a15332ed Deployed Nov 10, 2026 by vercel[bot]
Preview – shepherd-docs — a15332ed Deployed Nov 10, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file internal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant