Form Validation
フォームの検証
フォーム検証では、規則とメッセージを使用して、欠落または間違った回答を見つけ、防止し、説明します。
実際の例
パスワードがルールに違反している場合、ページはフィールドの横に説明を表示します。スクリーンリーダーはそのメッセージを該当フィールドに関連付けることができます。
主な部分
- 01State signal
- 02Human-readable message
- 03Timing or progress
- 04Recovery path
以下の場合に使用します
有用になった時点でヘルプを表示し、必ずサーバーで再確認する
以下の場合は使用しないでください
回答を消したり、人を非難したり、「無効」とだけ言ったりしてはいけません。問題を解決する方法を説明してください。
コードで使用する名前
aria-invalid + server validation 出荷前に
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 フォームの検証 (Form Validation)。 User context:パスワードがルールに違反している場合、ページはフィールドの横に説明を表示します。スクリーンリーダーはそのメッセージを該当フィールドに関連付けることができます。 Recommended pattern:フォームの検証 (Form Validation)。 Why it fits:有用になった時点でヘルプを表示し、必ずサーバーで再確認する。 Do not use it when:回答を消したり、人を非難したり、「無効」とだけ言ったりしてはいけません。問題を解決する方法を説明してください。 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 フォームの検証 (Form Validation) 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.