Skip to content

fix(ui): preserve picker v2 shadow focus - #472

Merged
abharms merged 8 commits into
journey-to-the-shadow-domfrom
codex/picker-v2-shadow-focus-fixes
Nov 4, 2026
Merged

abharms merged 8 commits into
journey-to-the-shadow-domfrom
codex/picker-v2-shadow-focus-fixes

Conversation

@abharms

@abharms abharms commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • update Bible Card, Bible Reader, and picker Shadow DOM journeys for the picker v2 screen flow and focus order
  • keep Firefox from treating the scrollable version-list viewport as an extra Tab stop
  • prevent retained exit content from stealing focus after outside-click dismissal from Languages or Search Languages
  • preserve the journeys' isolation, overlay ownership, hostile-style, geometry, and rapid-reopen coverage

Verification

  • 37/37 picker and popover unit tests passed
  • 9/9 picker Shadow DOM journeys passed in Chromium
  • 9/9 picker Shadow DOM journeys passed in Firefox
  • 9/9 picker Shadow DOM journeys passed in WebKit
  • the new outside-dismissal regression failed before the production fix and passed afterward

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no new actionable defects were found.

Summary

Updates picker focus and browser journeys for the v2 screen flow.

  • The picker keeps focus on its dialog or the outside target.
  • Tab moves from the language button straight to a version row.

Reviews (6) · Last reviewed commit: "fix(ui): normalize picker reopen focus" · Reviewed by Greptile

@changeset-bot

changeset-bot Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 80117ed

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@youversion/platform-react-ui Patch
vite-react Patch
@youversion/platform-core Patch
@youversion/platform-react-hooks Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-04T15:03:54.656786Z 80117ed New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

abharms and others added 4 commits November 3, 2026 13:18
Assert the version list viewport overflows before checking Tab order,
cover outside dismissal from the Languages screen, restore a pill-shape
check for the language search input, and narrow the changeset wording.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@camrun91 camrun91 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks, @abharms! Both fixes are correct, and each one has a story test that fails without it. The CI is green. I have 3 required changes. I put 2 inline comments on the diff. The item below is in a file that is not in the diff.

1. Required: update the Safari and VoiceOver record
docs/shadow-dom-isolation-plan.md:207
The plan says that focus enters on the English selector and that Tab moves next to Close. This PR changes the focus order. Now focus goes to the dialog first, then Close, search, the language entry, and the first version. The rollout policy (docs/shadow-dom-rollout-policy.md:14 and :122) says that a focus change needs a new run in actual Safari. Playwright WebKit does not count.
Please run the 2 version picker journeys again in actual Safari, with the VoiceOver check, and update this row. If you cannot do the run now, please record in the plan that a rerun is pending, and link a ticket.

When these items are done, I can approve. Thank you!

@abharms

abharms commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks for the careful review. I addressed both inline findings in 80117ed: rapid reopen now uses the same guarded, Safari-safe dialog focus scheduler as the chapter picker, and the Firefox scroll-region workaround now has an inline explanation. All 9 picker Shadow DOM journeys pass in Chromium, Firefox, and WebKit; 32 picker unit tests, type-check, and lint also pass.

I do not think the actual-Safari/VoiceOver rerun or a rewrite of the October validation row is required for this PR:

  • Picker v2 dialog focus on a fresh open already exists on the declared base. This PR updates stale journeys to that base behavior; it does not introduce that initial-focus target.
  • The rollout policy requires another actual-Safari run after changes to the shared host, stylesheet installation, portal controller, focus controller, or another significant platform seam. This PR changes picker-local focus behavior and one internal scroll region, not those shared seams.
  • The component-ticket gate says not to repeat shared infrastructure proofs without a changed seam.
  • The version-picker row at docs/shadow-dom-isolation-plan.md:207 is a dated October 12 historical result. The October 14 YPE-6181 follow-up is recorded directly below it. Rewriting that row to describe later code would change the historical evidence rather than add new evidence.

The new focus code deliberately reuses the already validated chapter-picker scheduling pattern, including request invalidation, connection/state guards, and the Safari double-animation-frame delay. If there is a different policy trigger you believe applies to this component-local change, please point me to that exact requirement and I will revisit it.

@abharms
abharms merged commit 4d557b8 into journey-to-the-shadow-dom Nov 4, 2026
28 checks passed
@abharms
abharms deleted the codex/picker-v2-shadow-focus-fixes branch November 4, 2026 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants