From cc2603ff08fd9b3a55ebed6de0e1d2aa677c1e62 Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Thu, 22 May 2025 00:53:59 +0900 Subject: [PATCH 1/3] =?UTF-8?q?2025/04/10=20=E6=99=82=E7=82=B9=E3=81=AE?= =?UTF-8?q?=E8=8B=B1=E8=AA=9E=E7=89=88=E3=81=AB=E5=90=8C=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../html/reference/attributes/accept/index.md | 28 +++---- .../attributes/autocomplete/index.md | 25 +++---- .../reference/attributes/capture/index.md | 20 ++--- .../reference/attributes/dirname/index.md | 11 ++- .../reference/attributes/disabled/index.md | 42 +++++------ .../attributes/elementtiming/index.md | 11 ++- .../html/reference/attributes/for/index.md | 14 ++-- .../reference/attributes/maxlength/index.md | 5 +- .../reference/attributes/minlength/index.md | 13 ++-- .../reference/attributes/multiple/index.md | 31 ++++---- .../reference/attributes/placeholder/index.md | 6 +- .../reference/attributes/readonly/index.md | 73 ++++++++++++------- .../html/reference/attributes/size/index.md | 46 ++++++------ .../html/reference/attributes/step/index.md | 3 +- 14 files changed, 174 insertions(+), 154 deletions(-) diff --git a/files/ja/web/html/reference/attributes/accept/index.md b/files/ja/web/html/reference/attributes/accept/index.md index 8f9be6332edd25..b96c2e9585635f 100644 --- a/files/ja/web/html/reference/attributes/accept/index.md +++ b/files/ja/web/html/reference/attributes/accept/index.md @@ -1,23 +1,23 @@ --- title: "HTML 属性: accept" +short-title: accept slug: Web/HTML/Reference/Attributes/accept -original_slug: Web/HTML/Attributes/accept l10n: - sourceCommit: 942a529383ee7ee3996fb234187641c08935f3ff + sourceCommit: e9b6cd1b7fa8612257b72b2a85a96dd7d45c0200 --- {{HTMLSidebar}} **`accept`** 属性は、値としてカンマ区切りでファイル種別または[固有ファイル種別指定子](#unique_file_type_specifiers)を取り、どのファイル種別を受け入れるかを記述します。 -{{InteractiveExample("HTML Demo: accept", "tabbed-shorter")}} +{{InteractiveExample("HTML デモ: accept", "tabbed-shorter")}} ```html interactive-example - + - + ``` @@ -56,7 +56,7 @@ accept プロパティは {{HTMLElement("input/file", "file")}} 型の {{htmlele ``` -`accept` 属性は、選択されたファイルの種別を検証するものではありません。これはブラウザーがユーザーに対して正しいファイル種別を選択できるようにするためのガイドをするためのヒントを提供するだけです。ユーザーがファイルセレクターのオプションを切り替え、これを上書きして任意のファイルを選択し、不正なファイル種別を選択することは (ほとんどの場合) 可能です。 +`accept` 属性は、選択されたファイルの種別を検証するものではありません。これはブラウザーがユーザーに対して正しいファイル種別を選択できるようにするためのガイドをするためのヒントを提供するだけです。ユーザーがファイルセレクターのオプションを切り替え、これを上書きして任意のファイルを選択し、不正なファイル種別を選択することは(ほとんどの場合)可能です。 このため、期待される要件をサーバー側で検証するようにしてください。 @@ -66,15 +66,15 @@ accept プロパティは {{HTMLElement("input/file", "file")}} 型の {{htmlele ```html

- +

- +

- +

``` @@ -106,11 +106,11 @@ accept プロパティは {{HTMLElement("input/file", "file")}} 型の {{htmlele ```html
- +
- +
``` @@ -130,7 +130,7 @@ div { ユーザーの端末やオペレーティングシステムが何であろうと、ファイル入力には、ユーザーがファイルを選択するためのファイルピッカーダイアログを開くボタンが用意されす。 -上記のように [`multiple`](multiple) 属性を含めることで、複数のファイルを一度に選択できるようになります。ユーザーは、選択したプラットフォームが許す任意の方法でファイルピッカーから複数のファイルを選択することができます (例えば、Shift キーまたは Control キーを押しながらクリックするなど)。 `` ごとに 1 つのファイルのみを選択させたい場合は、 `multiple` 属性を省略してください。 +上記のように [`multiple`](/ja/docs/Web/HTML/Reference/Elements/input#multiple) 属性を含めることで、複数のファイルを一度に選択できるようになります。ユーザーは、選択したプラットフォームが許す任意の方法でファイルピッカーから複数のファイルを選択することができます(例えば、 Shift キーまたは Control キーを押しながらクリックするなど)。 `` ごとに 1 つのファイルのみを選択させたい場合は、 `multiple` 属性を省略してください。 ### 受け付けるファイル種別の制限 @@ -148,7 +148,7 @@ div { ```html
- +
- +
``` diff --git a/files/ja/web/html/reference/attributes/autocomplete/index.md b/files/ja/web/html/reference/attributes/autocomplete/index.md index 4bb1e0a68acdae..c1b76930659cf5 100644 --- a/files/ja/web/html/reference/attributes/autocomplete/index.md +++ b/files/ja/web/html/reference/attributes/autocomplete/index.md @@ -2,27 +2,26 @@ title: "HTML 属性: autocomplete" short-title: autocomplete slug: Web/HTML/Reference/Attributes/autocomplete -original_slug: Web/HTML/Attributes/autocomplete l10n: - sourceCommit: 0a406fde67d297e7d2771e4ba239f545eee46d07 + sourceCommit: e9b6cd1b7fa8612257b72b2a85a96dd7d45c0200 --- {{HTMLSidebar}} -HTML の `autocomplete` 属性は、ウェブ開発者は入力欄にどの種類の情報が期待されているかをブラウザーに示唆することができるのに加え、{{Glossary("user agent", "ユーザーエージェント")}}がフォーム入力欄の値を埋めるための自動支援を提供する必要があることを指定することができます。 +HTML の `autocomplete` 属性により、ウェブ開発者は入力欄にどの種類の情報が期待されているかをブラウザーに示唆することができるのに加え、{{Glossary("user agent", "ユーザーエージェント")}}がフォーム入力欄の値を埋めるための自動支援を提供する必要があることを指定することができます。 入力値としてテキストまたは数値を取る {{HTMLElement("input")}} 要素、 {{HTMLElement("textarea")}} 要素、 {{HTMLElement("select")}} 要素、 {{HTMLElement("form")}} 要素で利用できます。 -{{InteractiveExample("HTML Demo: autocomplete", "tabbed-shorter")}} +{{InteractiveExample("HTML デモ: autocomplete", "tabbed-shorter")}} ```html interactive-example - - - - + - + + + + ``` @@ -44,7 +43,7 @@ label { ``` -{{HTMLElement("input")}}, {{HTMLElement("select")}}, {{HTMLElement("textarea")}} 要素に `autocomplete` 属性がない場合、ブラウザーは[その要素の**所有元フォーム**の `autocomplete` 属性](/ja/docs/Web/HTML/Reference/Elements/form#autocomplete)を使用します。所有元フォームとは、要素の [`form`](/ja/docs/Web/HTML/Reference/Elements/input#form) 属性で指定された `id` に一致する `
` (存在する場合)か、より一般的には、その要素を内部に含んでいる `` です。 +{{HTMLElement("input")}}, {{HTMLElement("select")}}, {{HTMLElement("textarea")}} 要素に `autocomplete` 属性がない場合、ブラウザーは[その要素の**所有元フォーム**の `autocomplete` 属性](/ja/docs/Web/HTML/Reference/Elements/form#autocomplete)を使用します。所有元フォームとは、 {{HTMLElement("form")}} 要素のうち `id` が [`form`](/ja/docs/Web/HTML/Reference/Elements/input#form) 属性で指定された値に等しい要素(存在する場合)か、より一般的には、その要素を内部に含んでいる `` です。 > [!NOTE] > 自動入力を提供するために、ユーザーエージェントは ``/` + + ``` ```css interactive-example @@ -39,18 +39,41 @@ textarea:read-only { `readonly` 属性が input 要素に指定された場合、その入力欄をユーザーが編集できないので、その要素は制約検証が行われません。 -`readonly` 属性はフォームコントロールの `{{HTMLElement("input/text","text")}}`, `{{HTMLElement("input/search","search")}}`, `{{HTMLElement("input/url","url")}}`, `{{HTMLElement("input/tel","tel")}}`, `{{HTMLElement("input/email","email")}}`, `{{HTMLElement("input/password","password")}}`, `{{HTMLElement("input/date","date")}}`, `{{HTMLElement("input/month","month")}}`, `{{HTMLElement("input/week","week")}}`, `{{HTMLElement("input/time","time")}}`, `{{HTMLElement("input/datetime-local","datetime-local")}}`, `{{HTMLElement("input/number","number")}}` の {{HTMLElement("input")}} 型と {{HTMLElement("textarea")}} 要素が対応しています。これらの入力型や要素のいずれかに設定された場合、 {{cssxref(':read-only')}} 擬似クラスが一致します。この属性が含まれなかった場合は、 {{cssxref(':read-write')}} 擬似クラスが一致します。 - -この属性は {{HTMLElement("select")}} や、 `{{HTMLElement("input/checkbox","checkbox")}}` や `{{HTMLElement("input/radio","radio")}}` のように既に変更不可能な入力型、 `{{HTMLElement("input/file","file")}}` 入力型のように定義上初期状態で値を設定できない入力型は対応していません。 `{{HTMLElement("input/range","range")}}` や `{{HTMLElement("input/color","color")}}` は、どちらも既定値があります。 `{{HTMLElement("input/hidden","hidden")}}` も、非表示であればユーザーが値を入力することが期待できないので対応していません。ボタン型も、`image` を含め、すべて対応していません。 - -> [!NOTE] -> テキストコントロールだけが読み取り専用にすることができます。他のコントロール(チェックボックスやボタンなど)は、読み取り専用と無効との間に有用な違いがないため、 `readonly` 属性は適用されません。 - -入力に `readonly` 属性が設定されている場合、 {{cssxref(":read-only")}} 擬似クラスも適用されます。逆に、 `readonly` 属性に対応していても、この属性が設定されていない入力欄は、 {{cssxref(":read-write")}} 擬似クラスに一致します。 +`readonly` 属性は、次のようなテキストのフォームコントロールで対応してます。 + +- {{HTMLElement("input")}} 要素の型: + - `{{HTMLElement("input/text","text")}}` + - `{{HTMLElement("input/search","search")}}` + - `{{HTMLElement("input/tel","tel")}}` + - `{{HTMLElement("input/url","url")}}` + - `{{HTMLElement("input/email","email")}}` + - `{{HTMLElement("input/password","password")}}` + - `{{HTMLElement("input/date","date")}}` + - `{{HTMLElement("input/month","month")}}` + - `{{HTMLElement("input/week","week")}}` + - `{{HTMLElement("input/time","time")}}` + - `{{HTMLElement("input/datetime-local","datetime-local")}}` + - `{{HTMLElement("input/number","number")}}` +- {{HTMLElement("textarea")}} + +この属性は、 {{HTMLElement("select")}} や {{HTMLElement("button")}} を含む他のすべての要素には影響しません。また、次のようなテキスト以外の入力要素にも適用されません。 + +- `{{HTMLElement("input/hidden","hidden")}}` +- `{{HTMLElement("input/range","range")}}` +- `{{HTMLElement("input/color","color")}}` +- `{{HTMLElement("input/checkbox","checkbox")}}` +- `{{HTMLElement("input/radio","radio")}}` +- `{{HTMLElement("input/file","file")}}` +- `{{HTMLElement("input/submit","submit")}}` +- `{{HTMLElement("input/image","image")}}` +- `{{HTMLElement("input/reset","reset")}}` +- `{{HTMLElement("input/button","button")}}` + +`readonly` 属性に対応しており、この属性が設定されていない入力フィールドは、 {{cssxref(":read-write")}} 擬似クラスに一致します。それ以外の要素はすべて、 {{cssxref(":read-only")}} 擬似クラスに一致します。 ### 属性の相互作用 -[`disabled`](/ja/docs/Web/HTML/Reference/Attributes/disabled) と `readonly` の違いは、読み取り専用 (readonly) のコントロールは機能し、フォーカスを設定することもできるのに対し、無効な (disabled) コントロールはフォーカスを受け取ることができず、フォームで送信されず、一般に有効化されるまでコントロールとしては機能しません。 +[`disabled`](/ja/docs/Web/HTML/Reference/Attributes/disabled) と `readonly` の違いは、読み取り専用 (read-only) のコントロールは機能し、フォーカスを設定することもできるのに対し、無効な (disabled) コントロールはフォーカスを受け取ることができず、フォームで送信されず、一般に有効化されるまでコントロールとしては機能しません。 読み取り専用のフィールドはユーザーの操作で値を変更することはできないので、 [`required`](/ja/docs/Web/HTML/Reference/Attributes/required) は `readonly` 属性が一緒に指定されている入力欄では効果がありません。 @@ -72,24 +95,24 @@ readonly が付いた値を動的に変更できる唯一の方法は、スク ```html
- - + +
- +
- - + +
- - + +
- - + +
``` diff --git a/files/ja/web/html/reference/attributes/size/index.md b/files/ja/web/html/reference/attributes/size/index.md index 349212aacfb9ce..696576a67b3b5f 100644 --- a/files/ja/web/html/reference/attributes/size/index.md +++ b/files/ja/web/html/reference/attributes/size/index.md @@ -1,31 +1,33 @@ --- title: "HTML 属性: size" +short-title: size slug: Web/HTML/Reference/Attributes/size -original_slug: Web/HTML/Attributes/size -l10n: - sourceCommit: ba96f2f183353872db6d9242c7d2dffe2dbc0c35 +10n: + sourceCommit: e9b6cd1b7fa8612257b72b2a85a96dd7d45c0200 --- {{HTMLSidebar}} -**`size`** 属性は、 {{htmlelement('input')}} 要素の幅と {{htmlelement('select')}} 要素の高さを定義します。 `input` については、 `type` 属性が {{HTMLElement("input/text", "text")}} または {{HTMLElement("input/password", "password")}} の場合は文字数です。これは 0 以上の整数でなければなりません。 `size` が指定されていないか、無効な値が指定された場合、入力欄にサイズが宣言されず、そのフォームコントロールはユーザーエージェントに基づいた既定の幅になります。 CSS が幅に影響を与えるプロパティで要素を対象としている場合は、 CSS が優先されます。 +**`size`** 属性は、 {{htmlelement('input')}} 要素の幅と {{htmlelement('select')}} 要素の高さを定義します。 `input` については、 `type` 属性が {{HTMLElement("input/text", "text")}} または {{HTMLElement("input/password", "password")}} の場合は文字数です。これは 0 以上の整数でなければなりません。 + +`size` が指定されていないか、無効な値が指定された場合、入力欄にサイズが宣言されず、そのフォームコントロールはユーザーエージェントに基づいた既定の幅になります。 CSS が幅に影響を与えるプロパティで要素を対象としている場合は、 CSS が優先されます。 `size` 属性は制約検証には影響しません。 {{InteractiveExample("HTML Demo: size", "tabbed-standard")}} ```html interactive-example - + - + - + ``` @@ -41,25 +43,25 @@ label { 一部の入力型で `size` を指定すると、入力欄の幅を制御することができます。 select に size を追加すると、閉じた状態のときにいくつの選択肢が見えるかを定義します。 ```html - + - + ``` diff --git a/files/ja/web/html/reference/attributes/step/index.md b/files/ja/web/html/reference/attributes/step/index.md index c92d7f25ac7edf..c8e3b118488210 100644 --- a/files/ja/web/html/reference/attributes/step/index.md +++ b/files/ja/web/html/reference/attributes/step/index.md @@ -2,9 +2,8 @@ title: "HTML 属性: step" short-title: step slug: Web/HTML/Reference/Attributes/step -original_slug: Web/HTML/Attributes/step l10n: - sourceCommit: 5b20f5f4265f988f80f513db0e4b35c7e0cd70dc + sourceCommit: e9b6cd1b7fa8612257b72b2a85a96dd7d45c0200 --- {{HTMLSidebar}} From f599455b84d5df39d28a84f33f49450b1ec1357b Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Fri, 23 May 2025 01:03:04 +0900 Subject: [PATCH 2/3] =?UTF-8?q?=E3=83=87=E3=83=A2=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- files/ja/web/html/reference/attributes/minlength/index.md | 2 +- files/ja/web/html/reference/attributes/multiple/index.md | 2 +- files/ja/web/html/reference/attributes/readonly/index.md | 2 +- files/ja/web/html/reference/attributes/size/index.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/files/ja/web/html/reference/attributes/minlength/index.md b/files/ja/web/html/reference/attributes/minlength/index.md index c99fa7d1e0e226..ea10b4b7cfa2e4 100644 --- a/files/ja/web/html/reference/attributes/minlength/index.md +++ b/files/ja/web/html/reference/attributes/minlength/index.md @@ -16,7 +16,7 @@ l10n: `minlength` は [`required`](/ja/docs/Web/HTML/Reference/Attributes/required) の意味を含みません。入力欄が `minlength` 制約に違反するのは、ユーザーが値を入力した場合のみです。入力欄に `required` が設定されていない場合、 `minlength` を設定していても、空文字列を送信することができます。 -{{InteractiveExample("HTML Demo: minlength", "tabbed-shorter")}} +{{InteractiveExample("HTML デモ: minlength", "tabbed-shorter")}} ```html interactive-example diff --git a/files/ja/web/html/reference/attributes/multiple/index.md b/files/ja/web/html/reference/attributes/multiple/index.md index 3b5fe3c63daf1b..78420cf15ed886 100644 --- a/files/ja/web/html/reference/attributes/multiple/index.md +++ b/files/ja/web/html/reference/attributes/multiple/index.md @@ -10,7 +10,7 @@ l10n: 論理属性の **`multiple`** 属性は、設定されている場合、フォームコントロールが 1 つ以上の値を受け入れることを意味します。この属性は {{HTMLElement("input/email", "email")}} と {{HTMLElement("input/file", "file")}} の入力型と {{HTMLElement("select")}} に対して有効です。ユーザーが複数の値を選択する方法は、フォームコントロールに依存します。 -{{InteractiveExample("HTML Demo: multiple", "tabbed-standard")}} +{{InteractiveExample("HTML デモ: multiple", "tabbed-standard")}} ```html interactive-example diff --git a/files/ja/web/html/reference/attributes/readonly/index.md b/files/ja/web/html/reference/attributes/readonly/index.md index a5a415a5ed2b90..e3f0064c836370 100644 --- a/files/ja/web/html/reference/attributes/readonly/index.md +++ b/files/ja/web/html/reference/attributes/readonly/index.md @@ -10,7 +10,7 @@ l10n: **`readonly`** は論理属性で、存在する場合、要素が変更可能ではなくなり、ユーザーがそのコントロールを編集できなくなります。 -{{InteractiveExample("HTML Demo: readonly", "tabbed-shorter")}} +{{InteractiveExample("HTML デモ: readonly", "tabbed-shorter")}} ```html interactive-example diff --git a/files/ja/web/html/reference/attributes/size/index.md b/files/ja/web/html/reference/attributes/size/index.md index 696576a67b3b5f..ec1bd7f618fc3b 100644 --- a/files/ja/web/html/reference/attributes/size/index.md +++ b/files/ja/web/html/reference/attributes/size/index.md @@ -14,7 +14,7 @@ slug: Web/HTML/Reference/Attributes/size `size` 属性は制約検証には影響しません。 -{{InteractiveExample("HTML Demo: size", "tabbed-standard")}} +{{InteractiveExample("HTML デモ: size", "tabbed-standard")}} ```html interactive-example From 7338fd5f39fd268ac08344fc47160fb375703abb Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Fri, 23 May 2025 01:05:03 +0900 Subject: [PATCH 3/3] Update index.md --- files/ja/web/html/reference/attributes/size/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/ja/web/html/reference/attributes/size/index.md b/files/ja/web/html/reference/attributes/size/index.md index 696576a67b3b5f..a3ff79c4f45b81 100644 --- a/files/ja/web/html/reference/attributes/size/index.md +++ b/files/ja/web/html/reference/attributes/size/index.md @@ -2,7 +2,7 @@ title: "HTML 属性: size" short-title: size slug: Web/HTML/Reference/Attributes/size -10n: +l10n: sourceCommit: e9b6cd1b7fa8612257b72b2a85a96dd7d45c0200 ---