Keyboard Trap
キーボードトラップ
キーボードトラップは、フォーカスがページの一部に入るがキーボードでそこから出られないときに発生します。
もう一つの例
旅行者が日付ピッカーを開きます。彼らは日付を行き来したり、Escapeキーを押して閉じたり、選択後にTabキーを押したりできます。壊れたカレンダーはすべてのTabキー入力をキャッチし、抜け道を与えません。
主な部分
- 01エントリパス
- 02内部操作
- 03文書化された終了
以下の場合に使用します
キーボードのみで、複雑なウィジェット、オーバーレイ、埋め込みエディタ、およびサードパーティのフレームをすべてテストしてください。人々が出入りできることを確認してください。
以下の場合は使用しないでください
モーダルのフォーカスループは、Escapeキーと表示されている閉じるボタンで常に離脱できる場合、トラップではありません。
コードで使用する名前
keyboard-only test: enter, operate, Escape or Tab out 出荷前に
Before release, check the page structure, keyboard access, visible focus, contrast, and zoom. Also check loading, empty, error, success, cancel, and reduced-motion states.
Outcome:Complete the task with キーボードトラップ (Keyboard Trap)。 User context:旅行者が日付ピッカーを開きます。彼らは日付を行き来したり、Escapeキーを押して閉じたり、選択後にTabキーを押したりできます。壊れたカレンダーはすべてのTabキー入力をキャッチし、抜け道を与えません。 Recommended pattern:キーボードトラップ (Keyboard Trap)。 Why it fits:キーボードのみで、複雑なウィジェット、オーバーレイ、埋め込みエディタ、およびサードパーティのフレームをすべてテストしてください。人々が出入りできることを確認してください。 Do not use it when:モーダルのフォーカスループは、Escapeキーと表示されている閉じるボタンで常に離脱できる場合、トラップではありません。 Product requirements: Define the default, loading, empty, error, success, and recovery states. Keep user input. Give clear feedback after every action. Accessibility and resilience: Use semantic HTML, full keyboard access, and visible focus. Make the layout work when zoomed and support reduced motion. Follow the project’s current rules. Do not add a new UI library unless the project already uses it. Acceptance criteria: The main task works with keyboard only and at 320px width. Focus and status changes are announced. Check loading, failure, retry, cancel, and reduced-motion paths. Evidence and limits (evidence boundary):この標準は、列挙された範囲のみを対象とします。視覚スタイル、製品の判断、またはVibularyの例は選びません。 Unknowns to confirm: Product wording, data source, analytics events, supported devices and languages, and platform limits.
このリクエストを確認する
Review how キーボードトラップ (Keyboard Trap) is used now. Definition: キーボードトラップは、フォーカスがページの一部に入るがキーボードでそこから出られないときに発生します。 Release checks: Before release, check the page structure, keyboard access, visible focus, contrast, and zoom. Also check loading, empty, error, success, cancel, and reduced-motion states. Before changing code, list the evidence, gaps, severity, and the smallest safe fix.