fix(ui): modal に focus trap を足し、SuccessOverlay の focus 奪取を直す (B-R11f・a11y) - #652
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
…a11y) B-R11e (#639) の follow-up。 - lib/trapModalFocus.ts (新規): Tab/Shift+Tab を DOM 順で自前制御 (Safari 既定の Tab 設定でも循環)・ 一覧外の active (disabled 化等) は DOM 位置から直後/直前・focusable が無ければ dialog に留める・ IME (isComposing / 229) は奪わない・visibility は要素自身の computed 値・display:none と inert は祖先を遡る。 - QrPreviewModal / CsvPassModal / SuccessOverlay に trap を適用。Escape・初期 focus・閉じた後の復元は #639 の契約のまま。 - SuccessOverlay: inline onDismiss に依存する focus effect を latest-ref・mount 時のみ focus・guard 付き復元に (TipForm/CheckoutForm/PaymentForm からの再描画で focus を奪わない)。aria-live は毎秒更新の時計を含む dialog 全体から見出しに限定し、aria-labelledby で可視見出しから名前を導く (掟 8)。 - QrGenerator の不要な useCallback とコメントを整理。FX 期限切れの modal 内表示 (文言要) は対象外。 tests: ModalFocusTrap (Tab 循環・一覧外 active・除外判定)・SuccessOverlay の再描画で focus 不動。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HeizmagJBgL5peL5mQpxkc
cipherwebllc
force-pushed
the
fix/r6-b-r11f-modal-focus-trap
branch
from
September 25, 2026 04:47
c591343 to
bb0ef71
Compare
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.
概要
B-R11e (#639) の follow-up (計画 B-R11f)。a11y の修正で money-path は不変。
変更
lib/trapModalFocus.ts(新規): Tab / Shift+Tab を DOM 順で自前制御 (Safari 既定の Tab 設定でも循環)・一覧外の active (disabled 化等) は DOM 位置から直後/直前・focusable が無ければ dialog に留める・IME (isComposing / keyCode 229) は奪わない・visibility は要素自身の computed 値・display:none と inert は祖先を遡る。対応範囲 (contenteditable / iframe / media[controls] / area は対象外) をコメントに明記。aria-labelledbyで可視見出しから名前を導く (掟 8)。レビュー
Codex 実装 → Opus レビュー (修正必須なし・中 2 = SuccessOverlay にも trap / 自前の Tab 順・軽 4・既存 a11y 2 件) → 全て反映 → Fable 監査: typecheck / eslint / modal・overlay・form 系 8 file 688 件 pass・next build + bundle 予算 OK。full vitest は Codex 実行で pass。
🤖 Generated with Claude Code
https://claude.ai/code/session_01HeizmagJBgL5peL5mQpxkc