Focus Order
フォーカス順序
フォーカス順序は、ページを通してキーボードフォーカスがたどる経路です。読み順やタスク順と一致する必要があります。
もう一つの例
チェックアウトでは、Tabキーで連絡先情報、配送、支払い、確認、そして「注文を確定する」へと移動します。クーポンパネルは先にジャンプしません。住所ダイアログが閉じると、フォーカスはそれを開いたボタンに戻ります。
主な部分
- 01エントリポイント
- 02順次停止
- 03フォーカス返却
以下の場合に使用します
読み取りとタスクの順序と同じにDOMの順序を保ちます。インタラクションがコンテキストを変更するときだけ、自分でフォーカスを移動してください。
以下の場合は使用しないでください
正のtabindex値を避ける。視覚的経路とキーボード経路が異なる場合にCSSの順序を使用しない。
コードで使用する名前
DOM order + tabindex=0/-1 + deliberate focus restoration 出荷前に
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 フォーカス順序 (Focus Order)。 User context:チェックアウトでは、Tabキーで連絡先情報、配送、支払い、確認、そして「注文を確定する」へと移動します。クーポンパネルは先にジャンプしません。住所ダイアログが閉じると、フォーカスはそれを開いたボタンに戻ります。 Recommended pattern:フォーカス順序 (Focus Order)。 Why it fits:読み取りとタスクの順序と同じにDOMの順序を保ちます。インタラクションがコンテキストを変更するときだけ、自分でフォーカスを移動してください。 Do not use it when:正のtabindex値を避ける。視覚的経路とキーボード経路が異なる場合にCSSの順序を使用しない。 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 フォーカス順序 (Focus Order) 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.