aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/html/global_attributes/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/ja/web/html/global_attributes/index.html')
-rw-r--r--files/ja/web/html/global_attributes/index.html197
1 files changed, 0 insertions, 197 deletions
diff --git a/files/ja/web/html/global_attributes/index.html b/files/ja/web/html/global_attributes/index.html
deleted file mode 100644
index 6c5c45b71e..0000000000
--- a/files/ja/web/html/global_attributes/index.html
+++ /dev/null
@@ -1,197 +0,0 @@
----
-title: グローバル属性
-slug: Web/HTML/Global_attributes
-tags:
- - Attribute
- - HTML
- - Reference
- - Web
-translation_of: Web/HTML/Global_attributes
----
-<div>{{HTMLSidebar("Global_attributes")}}</div>
-
-<p><strong>グローバル属性</strong>は、すべての HTML 要素で共通の属性です。すべての要素で使用できますが、要素によっては効果がないこともあります。</p>
-
-<p>グローバル属性は、<em>標準仕様で未定義の要素を含む</em> すべての <a href="/ja/docs/Web/HTML/Element">HTML 要素</a>で指定することができます。つまり、その要素を使用することで文書が HTML5 に準拠しなくなるような標準外の要素であっても、これらの属性は受け入れなければなりません。例えば <code>&lt;foo&gt;</code> は妥当な HTML 要素ではありませんが、 HTML5 準拠のブラウザーは <code>&lt;foo hidden&gt;...&lt;/foo&gt;</code> とマークアップされたコンテンツを非表示にします。</p>
-
-<p>基本的な HTML グローバル属性に加えて、以下のグローバル属性も存在します。</p>
-
-<ul>
- <li>{{HTMLAttrDef("xml:lang")}} と {{HTMLAttrDef("xml:base")}}。これらは XHTML 仕様から継承したもので非推奨ですが、互換性のために残されています。</li>
- <li>アクセシビリティを向上するために使用する、複数の <strong><code><a href="/ja/docs/Web/Accessibility/ARIA">aria-*</a></code></strong> 属性。</li>
- <li><a href="/ja/docs/Web/Guide/Events/Event_handlers">イベントハンドラー</a>属性: <strong><code>onabort</code></strong>, <strong><code>onautocomplete</code></strong>, <strong><code>onautocompleteerror</code></strong>, <strong><code>onblur</code></strong>, <strong><code>oncancel</code></strong>, <strong><code>oncanplay</code></strong>, <strong><code>oncanplaythrough</code></strong>, <strong><code>onchange</code></strong>, <strong><code>onclick</code></strong>, <strong><code>onclose</code></strong>, <strong><code>oncontextmenu</code></strong>, <strong><code>oncuechange</code></strong>, <strong><code>ondblclick</code></strong>, <strong><code>ondrag</code></strong>, <strong><code>ondragend</code></strong>, <strong><code>ondragenter</code></strong>, <strong><code>ondragexit</code></strong>, <strong><code>ondragleave</code></strong>, <strong><code>ondragover</code></strong>, <strong><code>ondragstart</code></strong>, <strong><code>ondrop</code></strong>, <strong><code>ondurationchange</code></strong>, <strong><code>onemptied</code></strong>, <strong><code>onended</code></strong>, <strong><code>onerror</code></strong>, <strong><code>onfocus</code></strong>, <strong><code>oninput</code></strong>, <strong><code>oninvalid</code></strong>, <strong><code>onkeydown</code></strong>, <strong><code>onkeypress</code></strong>, <strong><code>onkeyup</code></strong>, <strong><code>onload</code></strong>, <strong><code>onloadeddata</code></strong>, <strong><code>onloadedmetadata</code></strong>, <strong><code>onloadstart</code></strong>, <strong><code>onmousedown</code></strong>, <strong><code>onmouseenter</code></strong>, <strong><code>onmouseleave</code></strong>, <strong><code>onmousemove</code></strong>, <strong><code>onmouseout</code></strong>, <strong><code>onmouseover</code></strong>, <strong><code>onmouseup</code></strong>, <strong><code>onmousewheel</code></strong>, <strong><code>onpause</code></strong>, <strong><code>onplay</code></strong>, <strong><code>onplaying</code></strong>, <strong><code>onprogress</code></strong>, <strong><code>onratechange</code></strong>, <strong><code>onreset</code></strong>, <strong><code>onresize</code></strong>, <strong><code>onscroll</code></strong>, <strong><code>onseeked</code></strong>, <strong><code>onseeking</code></strong>, <strong><code>onselect</code></strong>, <strong><code>onshow</code></strong>, <strong><code>onsort</code></strong>, <strong><code>onstalled</code></strong>, <strong><code>onsubmit</code></strong>, <strong><code>onsuspend</code></strong>, <strong><code>ontimeupdate</code></strong>, <strong><code>ontoggle</code></strong>, <strong><code>onvolumechange</code></strong>, <strong><code>onwaiting</code></strong>。</li>
-</ul>
-
-<h2 id="List_of_global_attributes" name="List_of_global_attributes">グローバル属性の一覧</h2>
-
-<dl>
- <dt><a href="/ja/docs/Web/HTML/Global_attributes/accesskey">{{HTMLAttrDef("accesskey")}}</a></dt>
- <dd>現在の要素に対するキーボードショートカットを生成するヒントを与えます。この属性の値は、空白区切りの文字のリストです。ブラウザーは、この文字リストの中から、コンピューターのキーボードレイアウトに存在する最初の文字を使用します。</dd>
- <dt><a href="/ja/docs/Web/HTML/Global_attributes/autocapitalize">{{HTMLAttrDef("autocapitalize")}}</a></dt>
- <dd>ユーザーが入力/編集したとき、入力文字列の大文字化を自動的に行うか、どこを大文字化するかを制御します。以下の値を指定することができます。
- <ul>
- <li><code>off</code> または <code>none</code>: 自動的な大文字化は行いません (すべての文字は小文字のままです)。</li>
- <li><code>on</code> または <code>sentences</code>: 各文の最初の文字を大文字にします。それ以外の文字は小文字のままです。</li>
- <li><code>words</code>:各単語の最初の文字を大文字にします。それ以外の文字は小文字のままです。</li>
- <li><code>characters</code>: すべての文字を大文字にします。</li>
- </ul>
- </dd>
- <dt><a href="/ja/docs/Web/HTML/Global_attributes/class">{{HTMLAttrDef("class")}}</a></dt>
- <dd>要素のクラスの空白区切りリストです。 CSS の <a href="/ja/docs/Web/CSS/Class_selectors">クラスセレクター</a> や JavaScript の {{DOMxRef("Document.getElementsByClassName()")}} メソッドのような関数を使えば、特定の要素を選択したりアクセスしたりすることができます。</dd>
- <dt><a href="/ja/docs/Web/HTML/Global_attributes/contenteditable">{{HTMLAttrDef("contenteditable")}}</a></dt>
- <dd>ユーザーによる要素の編集が可能かどうかを示す列挙型属性です。編集可能な場合、ブラウザーはその要素を編集可能なものに変更します。この属性の値は、以下のどちらかでなければなりません。
- <ul>
- <li><code>true</code> または <em>空文字列</em>: 要素が編集可能であることを示す</li>
- <li><code>false</code>: 要素は編集不可であることを示す</li>
- </ul>
- </dd>
- <dt><a href="/ja/docs/Web/HTML/Global_attributes/contextmenu">{{HTMLAttrDef("contextmenu")}}</a> {{Obsolete_Inline}}</dt>
- <dd>その要素のコンテキストメニューとして使用する {{HTMLElement("menu")}} の <code><a href="#attr-id"><strong>id</strong></a></code> を指定します。</dd>
- <dt><a href="/ja/docs/Web/HTML/Global_attributes/data-*">{{HTMLAttrDef("data-*")}}</a></dt>
- <dd>これらの属性はカスタムデータ属性と呼ばれており、 <a href="/ja/docs/Web/HTML">HTML</a> とその {{glossary("DOM")}} 表現との間で、固有の情報を交換できるようにします。すべてのカスタムデータは、その属性を設定した要素の {{DOMxRef("HTMLElement")}} インターフェイスを通して使用することができます。 {{DOMxRef("HTMLElement.dataset")}} プロパティでカスタムデータにアクセスできます。</dd>
- <dt><a href="/ja/docs/Web/HTML/Global_attributes/dir">{{HTMLAttrDef("dir")}}</a></dt>
- <dd>要素のテキストの書字方向を示す、列挙型属性です。以下の値を使用することができます。
- <ul>
- <li><code>ltr</code>: <em>left to right</em> を表し、左から右へ記述する言語 (日本語、英語など) に対して使用します。</li>
- <li><code>rtl</code>: <em>right to left</em> を表し、右から左へ記述する言語 (アラビア語など) に対して使用します。</li>
- <li><code>auto</code>: ユーザーエージェントに決定させます。要素の中の文字を、書字方向を強く決定する文字が見つかるまで解析し、その方向を要素全体に適用する基本的なアルゴリズムを使用します。</li>
- </ul>
- </dd>
- <dt><a href="/ja/docs/Web/HTML/Global_attributes/draggable">{{HTMLAttrDef("draggable")}}</a></dt>
- <dd><a href="/ja/docs/DragDrop/Drag_and_Drop">Drag and Drop API</a> を使用して要素をドラッグすることができるかを示す列挙型属性です。以下の値を使用することができます。
- <ul>
- <li><code>true</code>: 要素がドラッグ可能であることを示す</li>
- <li><code>false</code>: 要素がドラッグ不可であることを示す</li>
- </ul>
- </dd>
- <dt><a href="/ja/docs/Web/HTML/Global_attributes/dropzone">{{HTMLAttrDef("dropzone")}}</a> {{deprecated_inline}}</dt>
- <dd><a href="/ja/docs/DragDrop/Drag_and_Drop">Drag and Drop API</a> を使用して要素上にどのようなコンテンツをドロップできるかを示す列挙型属性です。以下の値を使用することができます。
- <ul>
- <li><code>copy</code>: ドラッグした要素をドロップすることで、コピーを生成することを示す</li>
- <li><code>move</code>: ドラッグした要素を新しい場所に移動することを示す</li>
- <li><code>link</code>: ドラッグしたデータへのリンクを生成する</li>
- </ul>
- </dd>
- <dt><a href="/ja/docs/Web/HTML/Global_attributes/exportparts">{{HTMLAttrDef("exportparts")}}</a> {{Experimental_Inline}}</dt>
- <dd>シャドウ部品を入れ子になったシャドウツリーから軽いツリーへ変換しながらエクスポートするために使用します。</dd>
- <dt><a href="/ja/docs/Web/HTML/Global_attributes/hidden">{{HTMLAttrDef("hidden")}}</a></dt>
- <dd>要素はまだ、あるいはもはや<em>関連性</em>がないことを示す、論理属性です。例えば、ログイン処理が完了するまで使えない要素を隠すために使用できます。ブラウザーはこの要素を表示しません。この属性は、表示することが正当なコンテンツを隠すために使用してはいけません。</dd>
- <dt><a href="/ja/docs/Web/HTML/Global_attributes/id">{{HTMLAttrDef("id")}}</a></dt>
- <dd>文書全体で一意でなければならない識別子 (ID) を定義します。(フラグメント識別子を使った) リンク、スクリプト、 (CSS での) スタイルづけなど要素を特定するために使用されます。</dd>
- <dt><a href="/ja/docs/Web/HTML/Global_attributes/inputmode">{{HTMLAttrDef("inputmode")}}</a></dt>
- <dd>この要素やその内容を編集する時に使用する仮想キーボードの種類の構成に関するヒントをブラウザーに与えます。主に {{HTMLElement("input")}} 要素で使用されますが、 {{htmlattrxref("contenteditable")}} モードにあるすべての要素で使用することができます。</dd>
- <dt><a href="/ja/docs/Web/HTML/Global_attributes/is">{{HTMLAttrDef("is")}}</a></dt>
- <dd>標準の HTML 要素が、登録したカスタム内蔵要素のようにふるまうように指定できます(詳しくは<a href="/ja/docs/Web/Web_Components/Using_custom_elements">カスタム要素の使用</a>を参照)。</dd>
-</dl>
-
-<div class="note">
-<p><strong>注:</strong> <code>item*</code> 属性は、 <a class="external" href="https://html.spec.whatwg.org/multipage/microdata.html#microdata">WHATWG HTML Microdata 機能</a>の一部です。</p>
-</div>
-
-<dl>
- <dt><a href="/ja/docs/Web/HTML/Global_attributes/itemid">{{HTMLAttrDef("itemid")}}</a></dt>
- <dd>項目の一意でグローバルな識別子です。</dd>
- <dt><a href="/ja/docs/Web/HTML/Global_attributes/itemprop">{{HTMLAttrDef("itemprop")}}</a></dt>
- <dd>項目にプロパティを追加するために使用します。すべての HTML 要素で <code>itemprop</code> 属性を指定することができ、この <code>itemprop</code> は名前と値の組で構成されます。</dd>
- <dt><a href="/ja/docs/Web/HTML/Global_attributes/itemref">{{HTMLAttrDef("itemref")}}</a></dt>
- <dd><code>itemscope</code> 属性を持つ要素の子孫以外のプロパティは、 <code>itemref</code> を使用して項目に関連付けることができます。文書中の他の場所で追加のプロパティがある要素の id (<code>itemid</code> ではない) の一覧を提供します。</dd>
- <dt><a href="/ja/docs/Web/HTML/Global_attributes/itemscope">{{HTMLAttrDef("itemscope")}}</a></dt>
- <dd><code>itemscope</code> は (通常) {{htmlattrxref("itemtype")}} とともに、ブロックに含まれている HTML が特定の項目に関するものであることを指定します。 <code>itemscope</code> は項目を作成し、それに関連付けられる <code>itemtype</code> のスコープを定義します。 <code>itemtype</code> は、項目やそのプロパティの文脈を説明するボキャブラリー (<a class="external external-icon" href="https://schema.org/">schema.org</a> など) の有効な URL です。</dd>
- <dt><a href="/ja/docs/Web/HTML/Global_attributes/itemtype">{{HTMLAttrDef("itemtype")}}</a></dt>
- <dd>データ構造内の <code>itemprop</code> (項目のプロパティ)を定義するために使う、ボキャブラリーの URL を指定します。 {{htmlattrxref("itemscope")}} は、 <code>itemtype</code> で設定したボキャブラリーがデータ構造内でアクティブになるスコープを設定するために使用します。</dd>
- <dt><a href="/ja/docs/Web/HTML/Global_attributes/lang">{{HTMLAttrDef("lang")}}</a></dt>
- <dd>要素の言語を定義します。編集不可能な要素を記述している言語、または編集可能な要素に記述されるべき言語を定義します。この属性の値は、 <a class="external" href="https://www.ietf.org/rfc/bcp/bcp47.txt"><em>Tags for Identifying Languages (BCP47)</em></a> で定義された形式の「言語タグ」(ハイフン区切りの「言語サブタグ」列)です。<a href="#attr-xml:lang"><strong>xml:lang</strong></a> はこの要素より優先します。</dd>
- <dt><a href="/ja/docs/Web/HTML/Global_attributes/part">{{HTMLAttrDef("part")}}</a></dt>
- <dd>要素のパート名の空白区切りによるリストです。パート名を利用すると、 CSS がシャドウツリー内にある特定の要素を {{CSSxRef("::part")}} 擬似要素を使用することで選択し、スタイル付けすることができます。</dd>
- <dt><a href="/ja/docs/Web/HTML/Global_attributes/slot">{{HTMLAttrDef("slot")}}</a></dt>
- <dd><a href="/ja/docs/Web/Web_Components/Shadow_DOM">shadow DOM</a> のシャドウツリー内のスロットを、要素に割り当てます。<code>slot</code> 属性を持つ要素は、<code>slot</code> 属性の値と一致する {{htmlattrxref("name", "slot")}} 属性の値を持つ {{HTMLElement("slot")}} 要素が生成したスロットに割り当てられます。</dd>
- <dt><a href="/ja/docs/Web/HTML/Global_attributes/spellcheck">{{HTMLAttrDef("spellcheck")}}</a></dt>
- <dd>要素でスペルチェックを行うかどうかを定義する、列挙型属性です。以下の値が使えます:
- <ul>
- <li><code>true</code>: 可能であればその要素でスペルチェックを行うことを示す</li>
- <li><code>false</code>: その要素でスペルチェックを行わないことを示す</li>
- </ul>
- </dd>
- <dt><a href="/ja/docs/Web/HTML/Global_attributes/style">{{HTMLAttrDef("style")}}</a></dt>
- <dd>要素に適用する <a href="/ja/docs/Web/CSS">CSS</a> スタイル宣言を設定します。なお、スタイルは別のファイルで定義することが推奨されます。この属性と {{HTMLElement("style")}} 要素の主な用途は、例えばテストのために、すばやくスタイルを適用することです。</dd>
- <dt><a href="/ja/docs/Web/HTML/Global_attributes/tabindex">{{HTMLAttrDef("tabindex")}}</a></dt>
- <dd>要素が入力フォーカスを受け付ける (<em>focusable</em>) 場合に、順番的なキーボードナビゲーションに参加するかどうか、参加するならばどの位置に入るかを示す、整数値属性です。いくつかの値を取ることができます。
- <ul>
- <li><em>負数</em>: 要素はフォーカスを受け付けますが、順番的なキーボードナビゲーションでは到達できません。</li>
- <li><code>0</code>: 要素はフォーカスを受け付けて、順番的なキーボードナビゲーションで到達できます。その順番はプラットフォームの慣習に従って定義されます。</li>
- <li><em>正数</em>: 要素はフォーカスを受け付けて、順番的なキーボードナビゲーションで到達できることを表します。その相対的な順序は属性の値で定義され、 <a href="#attr-tabindex"><strong>tabindex</strong></a> の数値の昇順にフォーカスを移します。複数の要素が同じ tabindex の値を持っている場合は、文書内における要素の相対的な位置に従います。</li>
- </ul>
- </dd>
- <dt><a href="/ja/docs/Web/HTML/Global_attributes/title">{{HTMLAttrDef("title")}}</a></dt>
- <dd>要素に関するアドバイザリー情報を表すテキストを設定します。この情報は通常、ツールチップとしてユーザーに表示されますが、必ず表示されるとは限りません。</dd>
- <dt><a href="/ja/docs/Web/HTML/Global_attributes/translate">{{htmlattrdef("translate")}}</a> {{Experimental_Inline}}</dt>
- <dd>要素の属性値や子孫 {{DOMxRef("Text")}} ノードの値が、ページをローカライズするときに翻訳対象となるか、あるいは変更せずにおくかを指定する、列挙型属性です。以下の値を使用することができます。
- <ul>
- <li>空文字列または <code>yes</code>: 要素が翻訳対象になることを示します。</li>
- <li><code>no</code>: 要素が翻訳対象にならないことを示します。</li>
- </ul>
- </dd>
-</dl>
-
-<h2 id="Specifications" name="Specifications">仕様書</h2>
-
-<table class="standard-table">
- <thead>
- <tr>
- <th scope="col">仕様書</th>
- <th scope="col">状態</th>
- <th scope="col">備考</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>{{SpecName("HTML WHATWG", "dom.html#global-attributes", "Global attributes")}}</td>
- <td>{{Spec2("HTML WHATWG")}}</td>
- <td></td>
- </tr>
- <tr>
- <td>{{SpecName("CSS Shadow Parts", "#exposing")}}</td>
- <td>{{Spec2("CSS Shadow Parts")}}</td>
- <td><code>part</code> および <code>exportparts</code> の各グローバル属性を追加。・</td>
- </tr>
- <tr>
- <td>{{SpecName("HTML5.2", "dom.html#global-attributes", "Global attributes")}}</td>
- <td>{{Spec2("HTML5.2")}}</td>
- <td>{{SpecName("HTML WHATWG")}} のスナップショット。 {{SpecName("HTML5.1")}} に <code>itemid</code>, <code>itemprop</code>, <code>itemref</code>, <code>itemscope</code>, <code>itemtype</code> を追加。</td>
- </tr>
- <tr>
- <td>{{SpecName("HTML5.1", "dom.html#global-attributes", "Global attributes")}}</td>
- <td>{{Spec2("HTML5.1")}}</td>
- <td>{{SpecName("HTML WHATWG")}} のスナップショット。 {{SpecName("HTML5 W3C")}} に <code>spellcheck</code>, <code>draggable</code>, <code>dropzone</code>, <code>spellcheck</code> を追加。</td>
- </tr>
- <tr>
- <td>{{SpecName("HTML5 W3C", "dom.html#global-attributes", "Global attributes")}}</td>
- <td>{{Spec2("HTML5 W3C")}}</td>
- <td>{{SpecName("HTML WHATWG")}} のスナップショット。 {{SpecName("HTML4.01")}} に、グローバル属性の概念を導入し、 <code>dir</code>, <code>lang</code>, <code>style</code>, <code>id</code>, <code>class</code>, <code>tabindex</code>, <code>accesskey</code>, <code>title</code> が真にグローバルな属性になった。<br>
- 当初は XHTML の一部であった <code>xml:lang</code> が、HTML に組み込まれた。<br>
- <code>hidden</code>, <code>data-*</code>, <code>contenteditable</code>, <code>translate</code> を追加。</td>
- </tr>
- <tr>
- <td>{{SpecName("HTML4.01")}}</td>
- <td>{{Spec2("HTML4.01")}}</td>
- <td>グローバル属性の定義なし。後の仕様書でグローバル属性になるいくつかの属性を、要素のサブセットで定義。<br>
- <code>class</code> および <code>style</code> は、次の要素を除くすべての要素で対応しています。 {{HTMLElement("base")}}, {{HTMLElement("basefont")}}, {{HTMLElement("head")}}, {{HTMLElement("html")}}, {{HTMLElement("meta")}}, {{HTMLElement("param")}}, {{HTMLElement("script")}}, {{HTMLElement("style")}}, {{HTMLElement("title")}}<br>
- <code>dir</code> は、次の要素を除くすべての要素で対応しています。 {{HTMLElement("applet")}}, {{HTMLElement("base")}}, {{HTMLElement("basefont")}}, {{HTMLElement("bdo")}}, {{HTMLElement("br")}}, {{HTMLElement("frame")}}, {{HTMLElement("frameset")}}, {{HTMLElement("iframe")}}, {{HTMLElement("param")}}, {{HTMLElement("script")}}<br>
- <code>id</code> は、次の要素を除くすべての要素で対応しています。 {{HTMLElement("base")}}, {{HTMLElement("head")}}, {{HTMLElement("html")}}, {{HTMLElement("meta")}}, {{HTMLElement("script")}}, {{HTMLElement("style")}}, {{HTMLElement("title")}}<br>
- <code>lang</code> は、次の要素を除くすべての要素で対応しています。 {{HTMLElement("applet")}}, {{HTMLElement("base")}}, {{HTMLElement("basefont")}}, {{HTMLElement("br")}}, {{HTMLElement("frame")}}, {{HTMLElement("frameset")}}, {{HTMLElement("iframe")}}, {{HTMLElement("param")}}, and {{HTMLElement("script")}}<br>
- <code>tabindex</code> は、次の要素のみで対応しています。 {{HTMLElement("a")}}, {{HTMLElement("area")}}, {{HTMLElement("button")}}, {{HTMLElement("object")}}, {{HTMLElement("select")}}, and {{HTMLElement("textarea")}}<br>
- <code>accesskey</code> は、次の要素のみで対応しています。 {{HTMLElement("a")}}, {{HTMLElement("area")}}, {{HTMLElement("button")}}, {{HTMLElement("input")}}, {{HTMLElement("label")}}, {{HTMLElement("legend")}} and {{HTMLElement("textarea")}}<br>
- <code>title</code> は、次の要素を除くすべての要素で対応しています。 {{HTMLElement("base")}}, {{HTMLElement("basefont")}}, {{HTMLElement("head")}}, {{HTMLElement("html")}}, {{HTMLElement("meta")}}, {{HTMLElement("param")}}, {{HTMLElement("script")}}, and {{HTMLElement("title")}}</td>
- </tr>
- </tbody>
-</table>
-
-<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの互換性</h2>
-
-<p>{{Compat("html.global_attributes")}}</p>
-
-<h2 id="See_also" name="See_also">関連情報</h2>
-
-<ul>
- <li>{{DOMxRef("Element")}} および {{DOMxRef("GlobalEventHandlers")}} インターフェイスで、ほとんどのグローバル属性を調べることができます。</li>
-</ul>