Read-only Field
読み取り専用フィールド
読み取り専用フィールドはフォーカスを受けることができ、その値をコピーすることができます。その人は値を編集できません。
readonly: focus + copy + submit, no edit; disabled: no normal focus or submit- 1表示名 · 編集可能
value="Maya" - 2アカウントID · 読み取り専用
readonly - 3招待コード · 無効
disabled
<input readonly>readonly: focus + copy + submit, no edit; disabled: no normal focus or submitA11Yもう一つの例
アカウントIDは読み取り専用です。人はそれにフォーカスを合わせてコピーできます。サポートされているネイティブフィールドは依然としてその値を送信します。
主な部分
- 01フィールドラベル
- 02現在の値
- 03読み取り専用属性
- 04フォーカス動作
- 05コピー行動
- 06フォーム送信の動作
以下の場合に使用します
値を常に表示し、コピーできる状態にしておく必要がある場合に使用します。現在のタスクでは編集を許可してはいけません。
以下の場合は使用しないでください
aria-readonlyだけを使って編集をブロックしないでください。ネイティブのreadonlyはサポートされているテキストコントロールにのみ適用されます。
コードで使用する名前
readonly: focus + copy + submit, no edit; disabled: no normal focus or submit 出荷前に
Give each field a label that code can read. Link hints and errors, and keep entered values. Check autofill, keyboard order, validation timing, submit states, failure recovery, zoom, and languages.
Outcome:Complete the task with 読み取り専用フィールド (Read-only Field)。 User context:アカウントIDは読み取り専用です。人はそれにフォーカスを合わせてコピーできます。サポートされているネイティブフィールドは依然としてその値を送信します。 Recommended pattern:読み取り専用フィールド (Read-only Field)。 Why it fits:値を常に表示し、コピーできる状態にしておく必要がある場合に使用します。現在のタスクでは編集を許可してはいけません。 Do not use it when:aria-readonlyだけを使って編集をブロックしないでください。ネイティブのreadonlyはサポートされているテキストコントロールにのみ適用されます。 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 読み取り専用フィールド (Read-only Field) is used now. Definition: 読み取り専用フィールドはフォーカスを受けることができ、その値をコピーすることができます。その人は値を編集できません。 Release checks: Give each field a label that code can read. Link hints and errors, and keep entered values. Check autofill, keyboard order, validation timing, submit states, failure recovery, zoom, and languages. Before changing code, list the evidence, gaps, severity, and the smallest safe fix.