#en
The id attribute represents
its element's unique identifier. The value must be unique in the subtree
within which the element finds itself and must contain at least one
character. The value must not contain any space characters.
#ja
id 属性は、
その要素の固有識別子を表します。値はその要素が現れる部分木中で固有でなければ[[MUST:ならず]]、
最低1文字含まなければ[[MUST:なりません]]。
値は間隔文字を含んでは[[MUST:なりません]]。
#en
If the value is not the empty string, user agents must associate the
element with the given value (exactly, including any space characters) for
the purposes of ID matching within the subtree the element finds itself
(e.g. for selectors in CSS or for the getElementById() method
in the DOM).
#ja
利用者エージェントは、値が空文字列でない場合、
その要素が現れる部分木中で ID 一致を行うために
(例えば CSS の選択子や DOM の getElementById()
メソッドのために)、
その要素に指定された値を (間隔文字も含めてそのまま)
関連付けなければ[[MUST:なりません]]。
#en
Identifiers are opaque strings. Particular meanings should not be
derived from the value of the id attribute.
#ja
識別子は不透明な文字列です。特定の意味を id 属性の値から見出す[[SHOULD:べきではありません]]。
#en
This specification doesn't preclude an element having multiple IDs, if
other mechanisms (e.g. DOM Core methods) can set an element's ID in a way
that doesn't conflict with the id attribute.
#ja
この仕様書は、他の仕組み (例えば DOM 中核のメソッド) によって
id 属性と矛盾しない形で要素の ID
を設定することができる場合に、要素が複数の ID を持つことを禁じていません。
#regexp
The * DOM attribute must reflect the * content attribute.
#ja
$1 DOM 属性は $2 内容属性を反映しなければ[[MUST:なりません]]。
#regexp
* The * element
#ja
$1 $2 要素
#regexp
* The * attribute
#ja
$1 $2 属性
#en
Categories
#ja
分類
#en
Metadata content.
#ja
メタデータ内容。
#en
Flow content.
#ja
流れ内容。
#en
Contexts in which this element may be used:
#ja
この要素を使っても[[MAY:よい]]文脈:
#en
Where flow content is expected.
#ja
流れ内容が期待される場所。
#en
Content model:
#ja
内容モデル:
#en
Phrasing content.
#ja
語句付け内容。
#en
Element-specific attributes:
#ja
要素固有属性:
#en
None.
#ja
なし。
#en
DOM interface:
#ja
DOM 界面:
#en
Uses HTMLElement.
#ja
HTMLElement を使用。
#regexp
* Embedding custom non-visible data
#ja
$1 カスタム非可視データの埋め込み
#en
A custom data attribute is an attribute whose name
starts with the string "data-", has at least one character
after the hyphen, is XML-compatible, and has
no namespace.
#ja
カスタム・データ属性は、
名前が文字列 "data-" で始まり、
ハイフンの後最低1文字あり、 XML 互換で、
名前空間を持たない属性です。
#en
Custom data
attributes are intended to store custom data private to the page or
application, for which there are no more appropriate attributes or
elements.
#ja
カスタム・データ属性は、
より適切な要素や属性がないような頁や応用の私的なカスタム・データを蓄積することを想定しています。
#en
Every HTML element
may have any number of custom data attributes specified, with any value.
#ja
すべての HTML 要素には、
任意の値のカスタム・データ属性を任意の個数指定して[[MAY:構いません]]。
#en
The dataset DOM
attribute provides convenient accessors for all the data-* attributes on an
element. On getting, the dataset DOM attribute must return a DOMStringMap object, associated with the
following three algorithms, which expose these attributes on their
element:
#ja
dataset DOM
属性は、要素のすべての data-* 属性の便宜アクセス子を提供します。
dataset DOM 属性は、取得時、
次の3つの算法 (要素のすべての data-* 属性を露出させます。)
と関連付けられた DOMStringMap
オブジェクトを返さなければ[[MUST:なりません]]。
#en
The algorithm for getting values from names
#ja
名前から値を取得する算法
#en
Let name be the concatenation of the string
data- and the name passed to the algorithm.
#ja
name を、文字列 data-
と算法に渡された名前を連結したものとします。
#en
If the element does not have an attribute with the name name, then the name has no corresponding value, abort.
#ja
要素が名前 name の属性を有しない場合は、
その名前は対応する値を持たず、停止します。
#en
Otherwise, return the value of the attribute with the name name.
#ja
そうでない場合、名前 name の属性の値を返します。
#en
The algorithm for setting names to certain values
#ja
名前をある値を設定する算法
#en
Let value be the value passed to the algorithm.
#ja
value を、算法に渡された値とします。
#en
Set the value of the attribute with the name name, to the value value, replacing
any previous value if the attribute already existed. If setAttribute() would have raised an exception when
setting an attribute with the name name, then this
must raise the same exception.
#ja
名前 name の属性の値を値 value
に設定します。ここで、属性が既に存在する場合、元の値は置き換えられます。 setAttribute() が名前 name
の属性を設定しようとした時に例外を発生させるような場合には、
これも同じ例外を発生させなければ[[MUST:なりません]]。
#en
The algorithm for deleting names
#ja
名前を削除する算法
#en
Remove the attribute with the name name, if such
an attribute exists. Do nothing otherwise.
#ja
名前 name の属性が存在すれば、これを削除します。
存在しない場合は、なにもしません。
#en
If a Web page wanted an element to represent a space ship, e.g. as part
of a game, it would have to use the class
attribute along with data-* attributes:
#ja
Web 頁に宇宙船を表す要素が必要な場合 (例えばゲーム中で)、
class
属性と共に data-*
属性を使う必要が生じることでしょう。
#en
Authors should carefully design such extensions so that when the
attributes are ignored and any associated CSS dropped, the page is still
usable.
#ja
著者は、このような拡張を設計する際、この属性が無視され、関連付けられた CSS
が除去されたとしても、なおその頁が利用可能であるよう、注意する[[SHOULD:べきです]]。
#en
User agents must not derive any implementation behavior from these
attributes or values. Specifications intended for user agents must not
define these attributes to have any meaningful values.
#ja
利用者エージェントは、これらの属性や値によって実装の動作を決めては[[MUST NOT:なりません]]。
利用者エージェントを想定した仕様書は、
これらの属性が意味のある値を持つように定義しては[[MUST NOT:なりません]]。