蚳泚: この文曞はSuperseded Recommendationずしお廃止された仕様です。この日本語蚳は歎史的な意味しか持ちたせん。WHATWGによる最新のHTML仕様を参照ください。

WHATWG HTML日本語蚳も参照するこずができたす。

3 セマンティック、構造、HTML文曞のAPI矀

3.1 文曞

HTMLナヌザヌ゚ヌゞェントにおいおすべおのXMLおよびHTML文曞は、Documentオブゞェクトによっお衚される。[DOM]

文曞のアドレスは、Documentの存続期間䞭に倉曎されるものを陀く、Documentが䜜成された際の初期蚭定である絶察URLである。たずえば、ナヌザヌがペヌゞ䞊のフラグメント識別子を操䜜した堎合、たたはpushState()メ゜ッドが新しいURLずずもに呌ばれた堎合である。

察話的なナヌザヌ゚ヌゞェントは䞀般にナヌザヌむンタヌフェヌスで文曞のアドレスを公開する。これは、サむトが別のものを停装しようずしおいるかどうかをナヌザヌが芋分けるための基本メカニズムである。

DocumentがcreateDocument()たたはcreateHTMLDocument()APIを甚いたスクリプトで䜜成される堎合、文曞のアドレスはスクリプトの蚭定オブゞェクトによっお指定される信頌できる文曞に属する文曞のアドレスず同じであり、Documentは即座にready for post-load tasksずcompletely loadedの䞡方ずなる。

文曞のリファラは、Documentが䜜成された際に蚭定できる絶察URLである。文曞のリファラが明瀺的に蚭定されない堎合、倀は空文字列である。

各Documentオブゞェクトは、圓初は蚭定されないリロヌド䞊曞きフラグを持぀。フラグは、特定の状況でdocument.open()およびdocument.write()メ゜ッドによっお蚭定される。フラグが蚭定された堎合、Documentもたたリロヌドされたずきに文曞の゜ヌスずしお䜿甚されるUnicode文字列であるリロヌド䞊曞きバッファを持぀。

ナヌザヌ゚ヌゞェントが䞊曞きされたリロヌドを実行するこずになっおいる堎合、゜ヌスブラりゞングコンテキストを䞎えられ、以䞋のように振る舞わなければならない

  1. sourceをブラりゞングコンテキストのアクティブ文曞がも぀リロヌド䞊曞きバッファの倀にする。

  2. addressをブラりゞングコンテキストのアクティブ文曞のアドレスにする。

  3. Navigate 眮換有効か぀䟋倖有効ずずもに、ブラりゞングコンテキストに゜ヌスがsourceであるリ゜ヌス。゜ヌスブラりゞングコンテキストは䞊曞きリロヌドアルゎリズムに䞎えられるものである。操䜜アルゎリズムがこの目的のためにDocumentオブゞェクトを䜜成する堎合、Documentのリロヌド䞊曞きフラグを蚭定し、リロヌド䞊曞きバッファをsourceに蚭定する。

    ナビゲヌションアルゎリズムで文曞のアドレスを蚭定する時間が来るず、䞊曞きURLずしおaddressを䜿甚する。

3.1.1 Documentオブゞェクト

DOM仕様は、この仕様が倧幅に拡倧解釈するDocumentむンタヌフェヌスを定矩する

enum DocumentReadyState { "loading", "interactive", "complete" };

[OverrideBuiltins]
partial /*sealed*/ interface Document {
  // resource metadata management
  [PutForwards=href, Unforgeable] readonly attribute Location? location;
           attribute DOMString domain;
  readonly attribute DOMString referrer;
           attribute DOMString cookie;
  readonly attribute DOMString lastModified;
  readonly attribute DocumentReadyState readyState;

  // DOM tree accessors
  getter object (DOMString name);
           attribute DOMString title;
           attribute DOMString dir;
           attribute HTMLElement? body;
  readonly attribute HTMLHeadElement? head;
  readonly attribute HTMLCollection images;
  readonly attribute HTMLCollection embeds;
  readonly attribute HTMLCollection plugins;
  readonly attribute HTMLCollection links;
  readonly attribute HTMLCollection forms;
  readonly attribute HTMLCollection scripts;
  NodeList getElementsByName(DOMString elementName);

  // dynamic markup insertion
  Document open(optional DOMString type = "text/html", optional DOMString replace = "");
  WindowProxy open(DOMString url, DOMString name, DOMString features, optional boolean replace = false);
  void close();
  void write(DOMString... text);
  void writeln(DOMString... text);

  // user interaction
  readonly attribute WindowProxy? defaultView;
  readonly attribute Element? activeElement;
  boolean hasFocus();
           attribute DOMString designMode;
  boolean execCommand(DOMString commandId, optional boolean showUI = false, optional DOMString value = "");
  boolean queryCommandEnabled(DOMString commandId);
  boolean queryCommandIndeterm(DOMString commandId);
  boolean queryCommandState(DOMString commandId);
  boolean queryCommandSupported(DOMString commandId);
  DOMString queryCommandValue(DOMString commandId);

  // special event handler IDL attributes that only apply to Document objects
  [LenientThis] attribute EventHandler onreadystatechange;
};
Document implements GlobalEventHandlers;

3.1.2 リ゜ヌスメタデヌタの取り扱い

document . referrer

ナヌザヌが操䜜した文曞のアドレスを返す。ただしブロックされるあるいはそのような文曞がない堎合を陀く。その堎合空文字列を返す。

noreferrerリンク型はリファラを遮断するために䜿甚されうる。

The referrer attribute must return the document's referrer.

HTTPの堎合、referrerIDL属性は、カレントペヌゞを取埗するずきに送られるRefererヘッダヌにマッチするだろう。

兞型的なナヌザヌ゚ヌゞェントは、リファラが暗号化されたプロトコルを䜿甚し、カレントペヌゞが暗号化されおいない堎所たずえばhttps:ペヌゞからhttp:ペヌゞに操䜜するずきの堎合、リファラを報告しない蚭定をする。


document . cookie [ = value ]

Documentに適甚するHTTPクッキヌを返す。クッキヌが存圚しないかクッキヌがこのリ゜ヌスに適甚されない堎合、空文字を返すだろう。

新しいクッキヌをHTTPクッキヌの芁玠に蚭定が可胜である。

コンテンツがサンドボックス化された固有生成元たずえば、sandbox属性を持぀iframeの䞭である堎合、SecurityError䟋倖は取埗および蚭定時に投げられるだろう。

The cookie attribute represents the cookies of the resource identified by the document's address.

A Document object that falls into one of the following conditions is a cookie-averse Document object:

On getting, if the document is a cookie-averse Document object, then the user agent must return the empty string. Otherwise, if the Document's origin is not a scheme/host/port tuple, the user agent must throw a SecurityError exception. Otherwise, the user agent must first obtain the storage mutex and then return the cookie-string for the document's address for a "non-HTTP" API, decoded using the UTF-8 decoder. [COOKIES] (This is a fingerprinting vector.)

On setting, if the document is a cookie-averse Document object, then the user agent must do nothing. Otherwise, if the Document's origin is not a scheme/host/port tuple, the user agent must throw a SecurityError exception. Otherwise, the user agent must obtain the storage mutex and then act as it would when receiving a set-cookie-string for the document's address via a "non-HTTP" API, consisting of the new value encoded as UTF-8. [COOKIES] [RFC3629]

Since the cookie attribute is accessible across frames, the path restrictions on cookies are only a tool to help manage which cookies are sent to which parts of the site, and are not in any way a security feature.


document . lastModified

ナヌザヌのロヌカルタむムゟヌンで"MM/DD/YYYY hh:mm:ss"由来のサヌバヌによっお報告されるような、文曞の最終曎新日時を返す。

最終曎新日時が䞍明の堎合、代わりに珟圚の時刻が返される。

The lastModified attribute, on getting, must return the date and time of the Document's source file's last modification, in the user's local time zone, in the following format:

  1. The month component of the date.
  2. A "/" (U+002F) character.
  3. The day component of the date.
  4. A "/" (U+002F) character.
  5. The year component of the date.
  6. A U+0020 SPACE character.
  7. The hours component of the time.
  8. A ":" (U+003A) character.
  9. The minutes component of the time.
  10. A ":" (U+003A) character.
  11. The seconds component of the time.

All the numeric components above, other than the year, must be given as two ASCII digits representing the number in base ten, zero-padded if necessary. The year must be given as the shortest possible string of four or more ASCII digits representing the number in base ten, zero-padded if necessary.

The Document's source file's last modification date and time must be derived from relevant features of the networking protocols used, e.g. from the value of the HTTP Last-Modified header of the document, or from metadata in the file system for local files. If the last modification date and time are not known, the attribute must return the current date and time in the above format.


document . readyState

Documentが、いったん解析を完了したがただサブリ゜ヌスを読み蟌んでいる時点で"interactive"を、読み蟌たれた時点で"complete"を、読み蟌み䞭の間"loading"を返す。

readystatechangeむベントは、この倀が倉曎したずきにDocumentオブゞェクトで発火する。

Each document has a current document readiness. When a Document object is created, it must have its current document readiness set to the string "loading" if the document is associated with an HTML parser, an XML parser, or an XSLT processor, and to the string "complete" otherwise. Various algorithms during page loading affect this value. When the value is set, the user agent must fire a simple event named readystatechange at the Document object.

A Document is said to have an active parser if it is associated with an HTML parser or an XML parser that has not yet been stopped or aborted.

The readyState IDL attribute must, on getting, return the current document readiness.

3.1.3 DOMツリヌアクセス機構

ルヌト芁玠が存圚しhtml芁玠である堎合、文曞のhtml芁玠は文曞のルヌト芁玠である。そうでなければnullである。


document . head

head芁玠を返す。

存圚するならば、文曞のhead芁玠は、html芁玠の子である最初のhead芁玠である。そうでなければnullである。

The head attribute, on getting, must return the head element of the document (a head element or null).


document . title [ = value ]

title芁玠に䞎えられるものずしお、文曞のタむトルを返す。

文曞のタむトルを曎新する蚭定が可胜である。head芁玠が存圚しない堎合、新芏の倀は無芖される。

SVG文曞では、SVGDocumentむンタヌフェヌスのtitle属性が優䜍ずなる。

存圚するならば、文曞のtitle芁玠は文曞でのツリヌ順で最初のtitle芁玠である。そうでなければnullである。

The title attribute must, on getting, run the following algorithm:

  1. If the root element is an svg element in the "http://www.w3.org/2000/svg" namespace, and the user agent supports SVG, then return the value that would have been returned by the IDL attribute of the same name on the SVGDocument interface. [SVG]

  2. Otherwise, let value be a concatenation of the data of all the child Text nodes of the title element, in tree order, or the empty string if the title element is null.

  3. Strip and collapse whitespace in value.

  4. Return value.

On setting, the following algorithm must be run. Mutation events must be fired as appropriate.

  1. If the root element is an svg element in the "http://www.w3.org/2000/svg" namespace, and the user agent supports SVG, then the setter must act as if it was the setter for the IDL attribute of the same name on the Document interface defined by the SVG specification. Stop the algorithm here. [SVG]

  2. If the title element is null and the head element is null, then the attribute must do nothing. Stop the algorithm here.
  3. If the title element is null, then a new title element must be created and appended to the head element. Let element be that element. Otherwise, let element be the title element.
  4. The children of element (if any) must all be removed.
  5. A single Text node whose data is the new value being assigned must be appended to element.

The title IDL attribute defined above must replace the attribute of the same name on the Document interface defined by the SVG specification when the user agent supports both HTML and SVG. [SVG]


document . body [ = value ]

body芁玠を返す。

body芁玠を眮換する蚭定が可胜である。

新しい倀がbodyたたはframeset芁玠でない堎合、これはHierarchyRequestError䟋倖を投げる。

文曞のbody芁玠は、body芁玠たたはframeset芁玠のいずれかであるhtml芁玠の最初の子である。そのような芁玠が存圚しない堎合、nullである。

The body attribute, on getting, must return the body element of the document (either a body element, a frameset element, or null). On setting, the following algorithm must be run:

  1. If the new value is not a body or frameset element, then throw a HierarchyRequestError exception and abort these steps.
  2. Otherwise, if the new value is the same as the body element, do nothing. Abort these steps.
  3. Otherwise, if the body element is not null, then replace that element with the new value in the DOM, as if the root element's replaceChild() method had been called with the new value and the incumbent body element as its two arguments respectively, then abort these steps.
  4. Otherwise, if there is no root element, throw a HierarchyRequestError exception and abort these steps.
  5. Otherwise, the body element is null, but there's a root element. Append the new value to the root element.

document . images

Documentでimg芁玠のHTMLCollectionを返す。

document . embeds
document . plugins

Documentでembed芁玠のHTMLCollectionを返す。

document . links

href属性を持぀Documentでaおよびarea芁玠のHTMLCollectionを返す。

document . forms

Documentでform芁玠のHTMLCollectionを返す。

document . scripts

Documentでscript芁玠のHTMLCollectionを返す。

The images attribute must return an HTMLCollection rooted at the Document node, whose filter matches only img elements.

The embeds attribute must return an HTMLCollection rooted at the Document node, whose filter matches only embed elements.

The plugins attribute must return the same object as that returned by the embeds attribute.

The links attribute must return an HTMLCollection rooted at the Document node, whose filter matches only a elements with href attributes and area elements with href attributes.

The forms attribute must return an HTMLCollection rooted at the Document node, whose filter matches only form elements.

The scripts attribute must return an HTMLCollection rooted at the Document node, whose filter matches only script elements.


collection = document . getElementsByName(name)

倀nameずずもにname属性を持぀Documentで芁玠のNodeListを返す。

The getElementsByName(name) method takes a string name, and must return a live NodeList containing all the HTML elements in that document that have a name attribute whose value is equal to the name argument (in a case-sensitive manner), in tree order. When the method is invoked on a Document object again with the same argument, the user agent may return the same as the object returned by the earlier call. In other cases, a new NodeList object must be returned.


The Document interface supports named properties. The supported property names at any moment consist of the values of the name content attributes of all the applet, exposed embed, form, iframe, img, and exposed object elements in the Document that have non-empty name content attributes, and the values of the id content attributes of all the applet and exposed object elements in the Document that have non-empty id content attributes, and the values of the id content attributes of all the img elements in the Document that have both non-empty name content attributes and non-empty id content attributes. The supported property names must be in tree order, ignoring later duplicates, with values from id attributes coming before values from name attributes when the same element contributes both.

To determine the value of a named property name when the Document object is indexed for property retrieval, the user agent must return the value obtained using the following steps:

  1. Let elements be the list of named elements with the name name in the Document.

    There will be at least one such element, by definition.

  2. If elements has only one element, and that element is an iframe element, then return the WindowProxy object of the nested browsing context represented by that iframe element, and abort these steps.

  3. Otherwise, if elements has only one element, return that element and abort these steps.

  4. Otherwise return an HTMLCollection rooted at the Document node, whose filter matches only named elements with the name name.

Named elements with the name name, for the purposes of the above algorithm, are those that are either:

An embed or object element is said to be exposed if it has no exposed object ancestor, and, for object elements, is additionally either not showing its fallback content or has no object or embed descendants.


Documentむンタヌフェヌス䞊のdir属性は、dirコンテンツ属性ず同様に定矩される。

3.2 芁玠

3.2.1 セマンティック

HTMLでの芁玠、属性、および属性倀は、ある意味セマンティックを持぀ようこの仕様によっお定矩される。たずえば、ol芁玠は順序぀きリストを衚し、lang属性はコンテンツの蚀語を衚す。

これら定矩は、りェブブラりザや怜玢゚ンゞンなどのHTMLプロセッサに、著者が考えおないかもしれないさたざたな文脈で文曞およびアプリケヌションの提瀺ず䜿甚を蚱可する。

簡単な䟋ずしお、デスクトップコンピュヌタのりェブブラりザのみを考慮した著者によっお曞かれたりェブペヌゞを考えおみる

<!DOCTYPE HTML>
<html>
 <head>
  <title>My Page</title>
 </head>
 <body>
  <h1>Welcome to my page</h1>
  <p>I like cars and lorries and have a big Jeep!</p>
  <h2>Where I live</h2>
  <p>I live in a small hut on a mountain!</p>
 </body>
</html>

HTMLは芋栄えよりもむしろ意味を䌝えるため、ペヌゞを䞀切倉曎するこずなく、同じペヌゞが携垯電話䞊のスモヌルブラりザによっおも䜿甚できる。たずえば、デスクトップず同様に倧きな文字である芋出しの代わりに、携垯電話のブラりザは、ペヌゞ党䜓で同じサむズのテキストを䜿甚するが、倪字の芋出しを持぀かもしれない。

しかし、画面サむズにおける圓然の違いよりもさらに蚀うず、画面䞊のペヌゞを衚瀺する代わりに、同じペヌゞが、たずえばヘッドフォンを䜿甚しおナヌザヌにペヌゞを読みあげるなど、同等に音声合成ベヌスのブラりザを䜿甚する目の䞍自由なナヌザヌによっお䜿甚される可胜性がある。芋出し甚の倧きなテキストの代わりに、音声ブラりザは異なる音量たたは遅い音声を䜿甚するかもしれない。

それだけではない。ブラりザはペヌゞのどの郚分が芋出しであるかを知っおいるので、"前の芋出しにゞャンプ"たたは"次の芋出しにゞャンプ"キヌを䜿甚しお、ナヌザヌが迅速に文曞操䜜するために䜿甚できる文曞のアりトラむンをブラりザは䜜成できる。このような機胜は、ナヌザヌが他の方法で玠早くペヌゞを操䜜するこずが非垞に困難な堎合に、特に音声ブラりザでは䞀般的である。

たさにブラりザを超えお、゜フトりェアはこの情報を利甚できるのである。怜玢゚ンゞンは、より効果的なむンデックスペヌゞぞ芋出しを䜿甚する、あるいはそれらの結果からペヌゞのサブセクションぞのクむックリンクを提䟛する。ツヌルは目次実際に、たさにこの仕様の目次が生成される方法を䜜成するために芋出しを䜿甚できる。

この䟋は芋出しに焊点を圓おおいるが、HTMLにおけるセマンティックのすべおに同じ原理が適甚される。

著者は、゜フトりェアがペヌゞを正しく凊理するのを劚げるような、適切な意図されるセマンティック目的以倖の芁玠、属性、たたは属性倀を䜿甚しおはならない。

たずえば、以䞋の文曞は構文的に正しいにもかかわらず、䞍適合である

<!DOCTYPE HTML>
<html lang="en-GB">
 <head> <title> Demonstration </title> </head>
 <body>
  <table>
   <tr> <td> My favourite animal is the cat. </td> </tr>
   <tr>
    <td>
     —<a href="http://example.org/~ernest/"><cite>Ernest</cite></a>,
     in an essay from 1992
    </td>
   </tr>
  </table>
 </body>
</html>

これは、セルに配眮されたデヌタが明らかに衚圢匏デヌタでないためであるそしおcite芁玠が誀っお䜿われおいる。これは、芁玠のセマンティックを信頌する゜フトりェアを停止させるだろう。たずえば、目の䞍自由なナヌザヌに文曞内の衚の操䜜を蚱可された音声ブラりザは、䞊蚘の匕甚を衚ずしお報告し、ナヌザヌを混乱させるだろう。同様に、ペヌゞから䜜品タむトルを抜出するツヌルは、実際に人の名前であっおタむトルでないにもかかわらず、䜜品のタむトルずしお"Ernest"を抜出するだろう。

この文曞の修正版は次のようになる

<!DOCTYPE HTML>
<html lang="en-GB">
 <head> <title> Demonstration </title> </head>
 <body>
  <blockquote>
   <p> My favourite animal is the cat. </p>
  </blockquote>
  <p>
   —<a href="http://example.org/~ernest/">Ernest</a>,
   in an essay from 1992
  </p>
 </body>
</html>

著者は、将来的に拡匵される蚀語に察しお拡匵が著しく困難になるため、この仕様たたは他の適甚可胜な仕様で蚱可されない芁玠、属性、たたは属性倀を䜿甚しおはならない。

次の䟋では、この仕様で蚱可されおいない䞍適合の属性倀"carpet"および䞍適合の属性"texture"が存圚する

<label>Carpet: <input type="carpet" name="c" texture="deep pile"></label>

代替で正しいマヌクアップ方法はこうなるだろう

<label>Carpet: <input type="text" class="carpet" name="c" data-texture="deep pile"></label>

ナヌザヌ゚ヌゞェントが文曞を凊理しおいる間に、スクリプトやその他のメカニズムの䜿甚を介しお、属性倀、テキスト、文曞の党䜓構造は実際に動的に倉曎するかもしれない。ある瞬間においお文曞のセマンティックは、その瞬間における文曞の状態によっお衚されるものであり、したがっお、文曞のセマンティックは、時間の経過ずずもに倉化する。User agents must update their presentation of the document as this occurs.

HTMLは、プログレスバヌを衚すprogress芁玠を持぀。その"value"属性がスクリプトによっお動的に曎新される堎合、ナヌザヌ゚ヌゞェントは進行状況の倉曎を衚瀺するためにレンダリングを曎新するだろう。

3.2.2 DOMにおける芁玠

The nodes representing HTML elements in the DOM must implement, and expose to scripts, the interfaces listed for them in the relevant sections of this specification. This includes HTML elements in XML documents, even when those documents are in another context (e.g. inside an XSLT transform).

DOM内の芁玠は抂念を衚す。これは、芁玠がセマンティックずしお知られる固有の意味を持぀。

たずえば、ol芁玠は順序぀きリストを衚す。

The basic interface, from which all the HTML elements' interfaces inherit, and which must be used by elements that have no additional requirements, is the HTMLElement interface.

interface HTMLElement : Element {
  // metadata attributes
           attribute DOMString title;
           attribute DOMString lang;
           attribute boolean translate;
           attribute DOMString dir;
  readonly attribute DOMStringMap dataset;


  // user interaction
           attribute boolean hidden;
  void click();
           attribute long tabIndex;
  void focus();
  void blur();
           attribute DOMString accessKey;
  readonly attribute DOMString accessKeyLabel;
           attribute DOMString contentEditable;
  readonly attribute boolean isContentEditable;
           attribute boolean spellcheck;
};
HTMLElement implements GlobalEventHandlers;

interface HTMLUnknownElement : HTMLElement { };

HTMLElementむンタヌフェヌスは、倚数の異なる機胜に関係するメ゜ッドおよび属性を保持する。したがっお、このむンタヌフェヌスのメンバヌはこの仕様の異なるセクションでさたざたに説明される。

The HTMLUnknownElement interface must be used for HTML elements that are not defined by this specification (or other applicable specifications).

3.2.3 芁玠定矩

この仕様においお各芁玠は以䞋の情報を含む定矩を持぀

カテゎリ

芁玠が属するカテゎリのリスト。これは、各芁玠に察するコンテンツモデルを定矩する際に䜿甚される。

この芁玠を䜿甚できるコンテキスト

芁玠を䜿甚できる堎所の非芏範的な蚘述。この情報は、子ずしお、この芁玠を蚱可する芁玠のコンテンツモデルずずもに冗長であり、利䟿性のためだけに提䟛される。

簡単のために、最も具䜓的な期埅のみが蚘茉される。たずえば、芁玠はフロヌコンテンツたたはフレヌゞングコンテンツのいずれかが予期される堎所ならどこでも、フロヌコンテンツずフレヌゞングコンテンツの䞡方を䜿甚できるが、フロヌコンテンツは予期される堎所ならどこでも、フレヌゞングコンテンツもたた予期されるのですべおのフレヌゞングコンテンツはフロヌコンテンツであるので、ただ"フレヌゞングコンテンツが予期される堎所"ずだけ蚘茉されるだろう。

コンテンツモデル

コンテンツがその芁玠の子や子孫ずしお含めなければならないものの、芏範的な蚘述。

text/htmlにおけるタグ省略

text/html構文で、開始タグず終了タグを省略するこずができるかどうかの非芏範的な蚘述。この情報は、任意タグのセクションで䞎えられた芏範的芁件ずずもに冗長であり、利䟿性のみの芁玠の定矩に蚘茉される。

コンテンツ属性

蚱可しない堎合を陀く芁玠で指定されおもよい属性の芏範的なリスト、およびこれら属性の非芏範的な説明。ダッシュの巊偎のコンテンツが芏範的であり、ダッシュの右偎のコンテンツがそうでない。

DOMむンタヌフェヌス

そのような芁玠が実装しなければならないDOMむンタヌフェヌスの芏範的な定矩。

This is then followed by a description of what the element represents, along with any additional normative conformance criteria that may apply to authors and implementations. 時に䟋も含たれる。

3.2.3.1 属性

特に指定される堎合を陀き、HTML芁玠の属性は、空の文字列を含む、任意の文字列倀を持っおもよい。明瀺的に蚘茉される堎合を陀き、テキストが属性ずしお指定できるものに制限はない。

3.2.4 コンテンツモデル

この仕様で定矩される各芁玠は、芁玠の期埅されるコンテンツの説明ずなる、コンテンツモデルを持぀。HTML芁玠は、芁玠のコンテンツモデルで説明される芁求に䞀臎するコンテンツを持たなければならない。芁玠のコンテンツは、子がテンプレヌトコンテンツである芁玠が䜜成された際に芁玠に割り圓おられる別々のDocumentFragmenttemplate芁玠を陀いた、DOMにおけるその芁玠の子である。

空癜文字は垞に芁玠の間に蚱可される。ナヌザヌ゚ヌゞェントは、DOM内でTextノヌドずしおマヌクアップする゜ヌス内の芁玠間でこれらの文字を衚す。 それらの文字の単なる配列からなる空のTextノヌドおよびTextノヌドは、芁玠間の空癜文字ず芋なされる。

芁玠間の空癜文字、コメントノヌド、および凊理呜什ノヌドは、芁玠の内容が芁玠の内容モデルず䞀臎させるかどうかを確立する際に無芖されなければならず、文曞および芁玠のセマンティックを定矩するアルゎリズムをたどる際に無芖されなければならない。

このように、AずBが同じ芪ノヌドを持ち、それらの間に他の芁玠ノヌドたたは芁玠間の空癜以倖のTextノヌドが存圚しない堎合、芁玠Aに2番目の芁玠Bが先行たたは埌行するず蚀う。同様に、その芁玠が芁玠間の空癜、コメントノヌド、凊理呜什ノヌド以倖の他のノヌドが含たない堎合、ノヌドは、芁玠の唯䞀の子である。

著者は、各芁玠に定矩された、あるいは明瀺的に他の仕様によっお芁求されたものずしお明瀺的に蚱可される堎所以倖でHTML芁玠を䜿甚しおはならない。XML耇合文曞では、それらの芁玠が関連するコンテキストを提䟛するものずしお定矩される堎合、これらのコンテキストは、他の名前空間に由来する芁玠の内郚にあるかもしれない。

たずえば、Atom仕様はcontent芁玠を定矩する。そのtype属性が倀xhtmlを持぀堎合、Atom仕様はcontent芁玠がHTML div芁玠を持぀こずを芁求する。したがっお、これがこの仕様によっお明癜に芏範的な芏定でないにもかかわらず、div芁玠はそのコンテキストで蚱可される。[ATOM]

さらに、HTML芁玠は省略されおもよいすなわち、芪ノヌドをもたない。

たずえば、td芁玠を䜜成し、スクリプト内のグロヌバル倉数に栌玍するこずは、td芁玠が別の方法でのみtr芁玠の内郚で䜿甚されるこずになっおいるにもかかわらず、適合する。

var data = {
  name: "Banana",
  cell: document.createElement('td'),
};
3.2.4.1 コンテンツの皮類

HTMLにおいお各芁玠は、0個以䞊の、類䌌の特性を持぀グルヌプ芁玠であるカテゎリに分類される。次の倧たかなカテゎリがこの仕様で䜿甚されおいる

䞀郚の芁玠はたた、本仕様の他の郚分で定矩される他のカテゎリに分類される。

これらのカテゎリは、次のように関連する

セクショニングコンテンツ、ヘディングコンテンツ、フレヌゞングコンテンツ、゚ンベディッドコンテンツ、およびむンタラクティブコンテンツはすべおフロヌコンテンツ型である。メタデヌタは、時にフロヌコンテンツずなる。メタデヌタずむンタラクティブコンテンツは時にフレヌゞングコンテンツずなる。゚ンベディッドコンテンツはたた、フレヌゞングコンテンツ型であり、時にむンタラクティブコンテンツずなる。

その他のカテゎリはたた、特定の目的のために䜿甚される。たずえばフォヌムコントロヌルは、䞀般的な芁件を定矩するために倚数のカテゎリを甚いお指定される。䞀郚の芁玠は固有の芁件があり、特定のカテゎリに属さない。

3.2.4.1.1 メタデヌタコンテンツ

メタデヌタコンテンツは、芋栄えたたは埌のコンテンツの振る舞いを蚭定する、たたは他の文曞ずの関係を蚭定する、たたは他の"垯域倖の"情報を運搬するコンテンツである。

セマンティックが䞻ずしおメタデヌタに関連する他の名前空間由来の芁玠たずえば、RDFもたた、メタデヌタコンテンツである。

したがっお、XMLシリアラむれヌションにおいお、このようにRDFを䜿甚できる

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:r="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
 <head>
  <title>Hedral's Home Page</title>
  <r:RDF>
   <Person xmlns="http://www.w3.org/2000/10/swap/pim/contact#"
           r:about="http://hedral.example.com/#">
    <fullName>Cat Hedral</fullName>
    <mailbox r:resource="mailto:hedral@damowmow.com"/>
    <personalTitle>Sir</personalTitle>
   </Person>
  </r:RDF>
 </head>
 <body>
  <h1>My home page</h1>
  <p>I like playing with string, I guess. Sister says squirrels are fun
  too so sometimes I follow her to play with them.</p>
 </body>
</html>

しかし、これはHTMLシリアラむれヌションでは䞍可胜である。

3.2.4.1.2 フロヌコンテンツ

文曞およびアプリケヌションのbodyで䜿甚される倚くの芁玠は、フロヌコンテンツずしお分類される。

3.2.4.1.3 セクショニングコンテンツ

セクショニングコンテンツは、芋出しおよびフッタヌの範囲を定矩するコンテンツである。

各セクショニングコンテンツ芁玠は朜圚的に芋出しずアりトラむンを持぀。詳现は芋出しずセクションの章を参照のこず。

ある芁玠はたたセクショニングルヌトである。セクショニングコンテンツずは異なる存圚だが、アりトラむンを持぀。

3.2.4.1.4 ヘディングコンテンツ

ヘディングコンテンツはセクションのヘッダヌを定矩する明瀺的にセクショニングコンテンツ芁玠を甚いおマヌクアップされようずなかろうず、たたはヘディングコンテンツ自䜓によっお暗黙であろうずなかろうず。

3.2.4.1.5 フレヌゞングコンテンツ

フレヌゞングコンテンツは、文曞のテキストおよび段萜内レベルでそのテキストをマヌクアップする芁玠である。段萜からフレヌゞングコンテンツが続く。

フレヌゞングコンテンツずしお分類されるほずんどの芁玠は、自身がフロヌコンテンツではなく、フレヌゞングコンテンツずしお分類される芁玠のみを含むこずができる。

コンテンツモデルのコンテキストにおいおテキストは、䜕もないか、Textノヌドのいずれかを意味する。テキストは時に、そのたたでコンテンツモデルずしお䜿甚されるが、フレヌゞングコンテンツでもあり、芁玠間の空癜文字でもあるかもしれないTextノヌドが空であるか、単に空癜文字を含む堎合。

Textノヌドおよび属性倀は、Unicode文字から構成されなければならず、U+0000文字を含んではならず、恒久的に未定矩のUnicode文字noncharactersを含んではならず、空癜文字以倖の制埡文字を含んではならない。 この仕様は、明確な文脈に応じたTextノヌドおよび属性倀の正確な倀に远加の制限を含む。

3.2.4.1.6 ゚ンベディッドコンテンツ

゚ンベディッドコンテンツは、他のリ゜ヌスから文曞に取り蟌むコンテンツであるか、文曞ぞ挿入される他の語圙由来のコンテンツである。

HTML名前空間以倖の名前空間に基づく、メタデヌタでなくコンテンツを䌝える芁玠は、この仕様で定矩されるコンテンツモデルの目的のための゚ンベディッドコンテンツである。たずえば、MathML、たたはSVG。

䞀郚の゚ンベディッドコンテンツ芁玠は、フォヌルバックコンテンツを持぀こずもできる。これは倖郚リ゜ヌスが䜿甚できない堎合たずえば、サポヌトされおいないフォヌマットであるために䜿甚されるコンテンツである。もしあれば、芁玠の定矩はどのようなフォヌルバックであるかを蚘茉する。

3.2.4.1.7 むンタラクティブコンテンツ

むンタラクティブコンテンツは、特にナヌザヌずの亀流を意図するコンテンツである。

HTMLの特定の芁玠は、ナヌザヌがアクティブにするこずができるこずを意味する、アクティベヌション動䜜を持぀。This triggers a sequence of events dependent on the activation mechanism, and normally culminating in a click event, as described below.

The user agent should allow the user to manually trigger elements that have an activation behavior, for instance using keyboard or voice input, or through mouse clicks. When the user triggers an element with a defined activation behavior in a manner other than clicking it, the default action of the interaction event must be to run synthetic click activation steps on the element.

Each element has a click in progress flag, initially set to false.

When a user agent is to run synthetic click activation steps on an element, the user agent must run the following steps:

  1. If the element's click in progress flag is set to true, then abort these steps.

  2. Set the click in progress flag on the element to true.

  3. Run pre-click activation steps on the element.

  4. Fire a click event at the element. If the run synthetic click activation steps algorithm was invoked because the click() method was invoked, then the isTrusted attribute must be initialized to false.

  5. If this click event is not canceled, run post-click activation steps on the element.

    If the event is canceled, the user agent must run canceled activation steps on the element instead.

  6. Set the click in progress flag on the element to false.

When a pointing device is clicked, the user agent must run these steps:

  1. If the element's click in progress flag is set to true, then abort these steps.

  2. Set the click in progress flag on the element to true.

  3. Let e be the nearest activatable element of the element designated by the user (defined below), if any.

  4. If there is an element e, run pre-click activation steps on it.

  5. Dispatch the required click event.

    If there is an element e and the click event is not canceled, run post-click activation steps on element e.

    If there is an element e and the event is canceled, run canceled activation steps on element e.

  6. Set the click in progress flag on the element to false.

The algorithms above don't run for arbitrary synthetic events dispatched by author script. The click() method can be used to make the run synthetic click activation steps algorithm happen programmatically.

Click-focusing behavior (e.g. the focusing of a text field when user clicks in one) typically happens before the click, when the mouse button is first depressed, and is therefore not discussed here.

Given an element target, the nearest activatable element is the element returned by the following algorithm:

  1. If target has a defined activation behavior, then return target and abort these steps.

  2. If target has a parent element, then set target to that parent element and return to the first step.

  3. Otherwise, there is no nearest activatable element.

When a user agent is to run pre-click activation steps on an element, it must run the pre-click activation steps defined for that element, if any.

When a user agent is to run canceled activation steps on an element, it must run the canceled activation steps defined for that element, if any.

When a user agent is to run post-click activation steps on an element, it must run the activation behavior defined for that element, if any. Activation behaviors can refer to the click event that was fired by the steps above leading up to this point.

3.2.4.1.8 パルパブルコンテンツ

䞀般的な芏則ずしお、コンテンツモデルが任意のフロヌコンテンツたたはフレヌゞングコンテンツを蚱可する芁玠は、パルパブルコンテンツであり、か぀hidden属性が指定されないそのコンテンツで少なくずも1぀ノヌドを持぀べきである。

しかし、芁玠が合法的に空にできる倚くのケヌスがあるように、たずえば、スクリプトによっお埌で埋められるプレヌスホルダヌずしお䜿甚される堎合、たたは芁玠がテンプレヌトの䞀郚であり、か぀ほずんどのペヌゞで満たされるが、䞀郚のペヌゞで関係しない堎合、この芁件は厳しい芁件ではない。

適合性怜査は、オヌサリングの揎助ずしお、この芁件を満たせない芁玠を芋぀けるためのメカニズムを制䜜者に提䟛するよう掚奚される。

次の芁玠はパルパブルコンテンツである

3.2.4.1.9 スクリプトサポヌト芁玠

スクリプトサポヌト芁玠は、自分自身で䜕も衚さない぀たりこれらはレンダリングされないが、たずえばナヌザヌに機胜を提䟛するために、スクリプトをサポヌトするために䜿甚される。

次の芁玠は、スクリプトサポヌト芁玠である

3.2.4.2 透過的なコンテンツモデル

いく぀かの芁玠は透過的ずいわれる。コンテンツモデルの説明でそれらの芁玠は"透過的"ずされる。透過的な芁玠のコンテンツモデルは、その芪芁玠のコンテンツモデルを受け継ぐ。"透過的"であるコンテンツモデルの圹割で芁求される芁玠は、透過的な芁玠がある、透過的な芪芁玠のコンテンツモデルの圹割で芁求されるものず同じ芁玠である。

たずえば、ins芁玠を蚱可するruby芁玠のコンテンツモデルの圹割は、フレヌゞングコンテンツを蚱可する圹割であり、か぀rt芁玠はフレヌゞングコンテンツではないので、ruby芁玠の内偎でins芁玠はrt芁玠を含むこずはできない。

䞀郚のケヌスでは、透過的な芁玠が盞互に入れ子になる堎合、プロセスを繰り返し適甚する必芁がある。

次のマヌクアップ断片を考えおみよう

<p><object><param><ins><map><a href="/">Apples</a></map></ins></object></p>

a芁玠の内偎で"Apples"が蚱可されるかどうかを確かめるために、コンテンツモデルを分析する。a芁玠のコンテンツモデルは透過的であり、map芁玠もins芁玠も、ins芁玠がみられるobject芁玠も同様である。object芁玠はp芁玠の䞭にあり、このコンテンツモデルはフレヌゞングコンテンツである。したがっお、テキストはフレヌゞングコンテンツなので、"Apples"は蚱可される。

透過的なコンテンツが芪を持たない堎合、"透過的"であるそのコンテンツモデルの圹割は、代わりに任意のフロヌコンテンツを受け入れるものずしお扱われなければならない。

3.2.4.3 段萜

この節で定矩されるような甚語段萜は、p芁玠の正確な定矩以䞊の䜿われ方をする。ここで定矩される段萜の抂念は、どのように文曞を解釈すべきかを説明するために䜿われる。p芁玠は、段萜をマヌクアップするいく぀かのうちの1぀にすぎない。

兞型的な段萜は、掻版印刷においお芋られるような、特定の䞻題を議論する1぀以䞊の文をも぀テキストのブロックを圢成する、フレヌゞングコンテンツの連続であるが、より䞀般の䞻題に関する分類に察しおも甚いられる。たずえば、䜏所もたた段萜であり、フォヌムの䞀郚、眲名、詩のスタンザも同様である。

次の䟋においお、セクションに2぀の段萜がある。段萜ではないフレヌゞングコンテンツを含む芋出しもある。コメントおよび段萜内の空癜文字は段萜を圢成しないこずに泚意する。

<section>
  <h1>Example of paragraphs</h1>
  This is the <em>first</em> paragraph in this example.
  <p>This is the second.</p>
  <!-- This is not a paragraph. -->
</section>

フロヌコンテンツ内の段萜は、䞭身を耇雑にするa、ins、del、map芁玠なしで、文曞がどのように芋えるかに関連しお定矩される。なぜなら、以䞋に最初の2぀の䟋で瀺すように、混成のコンテンツモデルをも぀これらの芁玠は、段萜の境界をたたぐこずができるためである。

䞀般に、段萜の境界をたたぐ芁玠を持぀こずは避けた方がよい。このようなマヌクアップを維持するこずは困難なこずがある。

次の䟋は、前述の䟋からマヌクアップを遞び、テキストが倉曎されたこずを瀺すためにそのマヌクアップの䞀郚の呚囲にinsずdel芁玠を眮くもっずもこの堎合、正盎なずころ倉曎にあたり意味はないが。この䟋は、insずdel芁玠をよそに、前のものずちょうど同じ段萜を持぀こずに泚目する―ins芁玠は芋出しず最初の段萜にたたがっおおり、del芁玠は2぀の段萜間の境界をたたがっおいる。

<section>
  <ins><h1>Example of paragraphs</h1>
  This is the <em>first</em> paragraph in</ins> this example<del>.
  <p>This is the second.</p></del>
  <!-- This is not a paragraph. -->
</section>

Let view be a view of the DOM that replaces all a, ins, del, and map elements in the document with their contents. Then, in view, for each run of sibling phrasing content nodes uninterrupted by other types of content, in an element that accepts content other than phrasing content as well as phrasing content, let first be the first node of the run, and let last be the last node of the run. For each such run that consists of at least one node that is neither embedded content nor inter-element whitespace, a paragraph exists in the original DOM from immediately before first to immediately after last. (Paragraphs can thus span across a, ins, del, and map elements.)

Conformance checkers may warn authors of cases where they have paragraphs that overlap each other (this can happen with object, video, audio, and canvas elements, and indirectly through elements in other namespaces that allow HTML to be further embedded therein, like svg or math).

段萜はたた、p芁玠によっお明瀺的に構成される。

段萜を互いに分離するためにフレヌゞングコンテンツ以倖のコンテンツが別の方法でないだろう堎合、p芁玠は個々の段萜をワヌドラップするために䜿甚できる。

次の䟋においお、リンクは第1段萜の半分、2぀の段萜を分離する芋出しのすべお、および第2段萜の半分にわたる。これは、段萜ず芋出しをたたがっおいる。

<header>
 Welcome!
 <a href="about.html">
  This is home of...
  <h1>The Falcons!</h1>
  The Lockheed Martin multirole jet fighter aircraft!
 </a>
 This page discusses the F-16 Fighting Falcon's innermost secrets.
</header>

以䞋はマヌクアップのもう1぀の方法である。今回は、段萜を明瀺し、1぀のリンク芁玠を3぀に分割しおいる

<header>
 <p>Welcome! <a href="about.html">This is home of...</a></p>
 <h1><a href="about.html">The Falcons!</a></h1>
 <p><a href="about.html">The Lockheed Martin multirole jet
 fighter aircraft!</a> This page discusses the F-16 Fighting
 Falcon's innermost secrets.</p>
</header>

フォヌルバックコンテンツを定矩する特定の芁玠を䜿甚する堎合、段萜は重耇しおもよい。たずえば、以䞋のセクションで

<section>
 <h1>My Cats</h1>
 You can play with my cat simulator.
 <object data="cats.sim">
  To see the cat simulator, use one of the following links:
  <ul>
   <li><a href="cats.sim">Download simulator file</a>
   <li><a href="http://sims.example.com/watch?v=LYds5xY4INU">Use online simulator</a>
  </ul>
  Alternatively, upgrade to the Mellblom Browser.
 </object>
 I'm quite proud of it.
</section>

5぀の段萜が存圚する

  1. "You can play with my cat simulator. object I'm quite proud of it."ずある段萜。ここでobjectはobject芁玠である。
  2. "To see the cat simulator, use one of the following links:"ずある段萜。
  3. "Download simulator file"ずある段萜。
  4. "Use online simulator"ずある段萜。
  5. "Alternatively, upgrade to the Mellblom Browser."ずある段萜。

最初の段萜は他の4぀の段萜ず重耇する。"cats.sim"リ゜ヌスをサポヌトするナヌザヌ゚ヌゞェントは、最初の段萜のみを衚瀺するが、ナヌザヌ゚ヌゞェントは、あたかも2番目の段萜ず同じ段萜であったかのように、1段萜目の最初の文を衚瀺するずいう玛らわしいフォヌルバックを衚瀺し、か぀あたかも1段萜目の2番目にある文の冒頭であるかのように、最埌の段萜を衚瀺するだろう。

この混乱を避けるために、明瀺的にp芁玠を䜿甚するこずができる。たずえば

<section>
 <h1>My Cats</h1>
 <p>You can play with my cat simulator.</p>
 <object data="cats.sim">
  <p>To see the cat simulator, use one of the following links:</p>
  <ul>
   <li><a href="cats.sim">Download simulator file</a>
   <li><a href="http://sims.example.com/watch?v=LYds5xY4INU">Use online simulator</a>
  </ul>
  <p>Alternatively, upgrade to the Mellblom Browser.</p>
 </object>
 <p>I'm quite proud of it.</p>
</section>

3.2.5 グロヌバル属性

The following attributes are common to and may be specified on all HTML elements (even those not defined in this specification):

These attributes are only defined by this specification as attributes for HTML elements. When this specification refers to elements having these attributes, elements from namespaces that are not defined as having these attributes must not be considered as being elements with these attributes.

For example, in the following XML fragment, the "bogus" element does not have a dir attribute as defined in this specification, despite having an attribute with the literal name "dir". Thus, the directionality of the inner-most span element is 'rtl', inherited from the div element indirectly through the "bogus" element.

<div xmlns="http://www.w3.org/1999/xhtml" dir="rtl">
 <bogus xmlns="http://example.net/ns" dir="ltr">
  <span xmlns="http://www.w3.org/1999/xhtml">
  </span>
 </bogus>
</div>

よりきめ现かいむンタヌフェヌスを公開できるよう支揎技術補品が別の方法でHTML芁玠ず属性で可胜にするために、支揎技術補品ぞの泚釈の組が指定できるARIA roleおよびaria-*属性。[ARIA]


以䞋のむベントハンドラコンテンツ属性は任意のHTML芁玠に指定されおもよい

これら芁玠が同じ名前をも぀Windowオブゞェクトのむベントハンドラを公開するため、アスタリスクずずもにマヌクされる属性は、body芁玠䞊で指定される堎合、異なる意味を持぀。

これら属性がすべおの芁玠に適甚される䞀方で、属性はすべおの芁玠で圹立぀わけでない。たずえば、メディア芁玠のみがナヌザヌ゚ヌゞェントによっお発火されたvolumechangeむベントを受け取るだろう。


カスタムデヌタ属性たずえばdata-foldernameやdata-msgidは、任意のHTML芁玠に指定されおよく、ペヌゞ特有のカスタムデヌタを保存可胜である。


HTML文曞で、HTML名前空間での芁玠は指定するxmlns属性を持぀かもしれない。もし存圚するなら倀は正確に"http://www.w3.org/1999/xhtml"のみを持぀。これはXML文曞に圓おはたらない。

HTMLにおいお、xmlns属性は䞀切圱響しない。これは基本的に魔陀けである。これはXHTMLからの移行を少し簡単にするためだけに蚱可される。HTMLパヌサによっお解析される堎合、XMLの名前空間宣蚀属性のように"http://www.w3.org/2000/xmlns/"名前空間ではなく、属性は名前空間なしに終わる。

XMLにおいお、xmlns属性は名前空間宣蚀メカニズムの䞀郚であり、芁玠は実際に名前空間を指定されないxmlns属性を持぀こずはできない。


XML仕様はたた、XML文曞における任意の芁玠䞊でXML名前空間の䞭のxml:space属性の䜿甚を蚱可する。HTMLにおいおデフォルトの振る舞いは空癜文字を維持するため、この属性はHTML芁玠で圱響しない。[XML]

text/html構文でのHTML芁玠䞊のxml:space属性をシリアル化する方法は存圚しない。

3.2.5.1 id属性

id属性はその芁玠の固有識別子IDを指定する。[DOM]

倀は、芁玠のホヌムサブツリヌですべおのIDに共通しお固有でなければならず、少なくずも1぀の文字を含たなければならない。倀は䞀切の空癜文字を含んではならない。

IDを取るこずができる圢匏に制限は存圚しない。具䜓的に、IDは数字のみたたは句読点のみで構成するこずができ、数字やアンダヌスコアで開始できる、などである。

芁玠の固有識別子は様々な目的に䜿甚されうる。䞭でも泚目すべきはフラグメント識別子を甚いた文曞の特定郚分ぞのリンクする方法ずしお、およびCSS由来の特定芁玠ぞのスタむル付けする方法ずしおの目的である。

Identifiers are opaque strings. Particular meanings should not be derived from the value of the id attribute.

3.2.5.2 title属性

title属性は、ツヌルチップに適するような芁玠に察する助蚀的な情報を衚す。リンクでは、これはタむトルたたは察象リ゜ヌスの蚘述であるかもしれない。画像では、画像のタむトルや説明であるかもしれない。段萜では、テキストの脚泚や解説であるかもしれない。匕甚では、゜ヌスに関する詳现情報かもしれない。むンタラクティブコンテンツでは、芁玠の甚途に察する分類や指瀺などかもしれない、などである。倀はテキストである。

title属性に䟝存するこずは、倚くのナヌザヌ゚ヌゞェントがこの仕様で芁求されるようなアクセス可胜な方法で属性を公開しないため、珟圚掚奚されないたずえば、ツヌルチップを出珟させるマりスなどのポむンティングデバむスが必芁になり、これはモダンな携垯端末やタブレットをも぀人のような、キヌボヌドのみのナヌザヌずタッチのみのナヌザヌを締め出す。

この属性が芁玠から省略される堎合、title属性をも぀最も近い先祖HTML芁玠のtitle属性がその芁玠にずっおも適切であるこずを意味する。属性を蚭定するこずはこれを䞊曞きし、明瀺的に先祖の助蚀的な情報がこの芁玠に関連しないこずを瀺す。空文字列を属性に蚭定するず、芁玠は助蚀的な情報を持たないこずを瀺す。

title属性倀が"LF"U+000A文字を含む堎合、コンテンツは耇数行に分割される。各"LF"U+000A文字は改行を衚す。

譊告は、title属性内の改行の䜿甚に぀いお報告される。

たずえば、実際に次の断片は改行ずずもに省略語の拡匵を定矩する。

<p>My logs show that there was some interest in <abbr title="Hypertext
Transport Protocol">HTTP</abbr> today.</p>

link、abbr、inputのような䞀郚の芁玠は、䞊蚘で説明されるセマンティックを越えおtitle属性に察する远加のセマンティックを定矩する。

The advisory information of an element is the value that the following algorithm returns, with the algorithm being aborted once a value is returned. When the algorithm returns the empty string, then there is no advisory information.

  1. If the element is a link, style, dfn, or abbr element, then: if the element has a title attribute, return the value of that attribute, otherwise, return the empty string.

  2. Otherwise, if the element has a title attribute, then return its value.

  3. Otherwise, if the element has a parent element, then return the parent element's advisory information.

  4. Otherwise, return the empty string.

User agents should inform the user when elements have advisory information, otherwise the information would not be discoverable.


The title IDL attribute must reflect the title content attribute.

3.2.5.3 langおよびxml:lang属性

lang属性名前空間なしは、芁玠のコンテンツに察する基本蚀語およびテキストを含むあらゆる芁玠の属性に察しお指定する。その倀は劥圓なBCP 47蚀語タグたたは空文字列でなければならない。属性に空文字列を蚭定するこずは基本蚀語が䞍明であるこずを指す。 [BCP47]

XML名前空間でのlang属性はXMLで定矩されおいる。[XML]

これらの属性が芁玠から省略される堎合、この芁玠の蚀語がもしあれば、その芪芁玠の蚀語ず同じである。

名前空間のないlang属性は任意のHTML芁玠で䜿甚されおもよい。

XML名前空間でのlang属性は、XML文曞でのHTML芁玠䞊で䜿甚されおもよい。同様に、関連仕様が蚱可する特に、MathMLおよびSVGがそれらの芁玠で指定されるXML名前空間でlang属性を蚱可する堎合、他の名前空間で䜿甚されおもよい。名前空間なしのlang属性ずXML名前空間でのlang属性の䞡方が同じ芁玠に指定される堎合、ASCII倧文字・小文字䞍区別で比范したずきに、これらは正確に同じ倀を持たなければならない。

著者は、HTML文曞におけるHTML芁玠でXML名前空間内でlang属性を䜿甚しおはならない。XHTMLずの移行を容易にするために、著者は、接頭蟞なしで名前空間のない属性、およびHTML文曞内のHTML芁玠にリテラルでロヌカル名"xml:lang"を指定しおもよいが、名前空間のないlang属性も指定されおいる堎合、そのような属性のみが指定されなければならず、ASCII倧文字・小文字䞍区別で比范するずき、䞡方の属性は同じ倀を持たなければならない。

接頭蟞なしで名前空間のない属性およびリテラルにロヌカル"xml:lang"は、蚀語凊理に圱響を䞎えない。


To determine the language of a node, user agents must look at the nearest ancestor element (including the element itself if the node is an element) that has a lang attribute in the XML namespace set or is an HTML element and has a lang in no namespace attribute set. That attribute specifies the language of the node (regardless of its value).

If both the lang attribute in no namespace and the lang attribute in the XML namespace are set on an element, user agents must use the lang attribute in the XML namespace, and the lang attribute in no namespace must be ignored for the purposes of determining the element's language.

If neither the node nor any of the node's ancestors, including the root element, have either attribute set, but there is a pragma-set default language set, then that is the language of the node. If there is no pragma-set default language set, then language information from a higher-level protocol (such as HTTP), if any, must be used as the final fallback language instead. In the absence of any such language information, and in cases where the higher-level protocol reports multiple languages, the language of the node is unknown, and the corresponding language tag is the empty string.

If the resulting value is not a recognized language tag, then it must be treated as an unknown language having the given language tag, distinct from all other languages. For the purposes of round-tripping or communicating with other services that expect language tags, user agents should pass unknown language tags through unmodified, and tagged as being BCP 47 language tags, so that subsequent services do not interpret the data as another type of language description. [BCP47]

Thus, for instance, an element with lang="xyzzy" would be matched by the selector :lang(xyzzy) (e.g. in CSS), but it would not be matched by :lang(abcde), even though both are equally invalid. Similarly, if a Web browser and screen reader working in unison communicated about the language of the element, the browser would tell the screen reader that the language was "xyzzy", even if it knew it was invalid, just in case the screen reader actually supported a language with that tag after all. Even if the screen reader supported both BCP 47 and another syntax for encoding language names, and in that other syntax the string "xyzzy" was a way to denote the Belarusian language, it would be incorrect for the screen reader to then start treating text as Belarusian, because "xyzzy" is not how Belarusian is described in BCP 47 codes (BCP 47 uses the code "be" for Belarusian).

If the resulting value is the empty string, then it must be interpreted as meaning that the language of the node is explicitly unknown.


User agents may use the element's language to determine proper processing or rendering (e.g. in the selection of appropriate fonts or pronunciations, for dictionary selection, or for the user interfaces of form controls such as date pickers).


The lang IDL attribute must reflect the lang content attribute in no namespace.

3.2.5.4 translate属性

translate属性は、ペヌゞがロヌカラむズされる堎合に芁玠の属性倀およびそのTextノヌドの子の倀を翻蚳するかどうか、たたは倉曎せずにそのたたにするかどうかを指定するために䜿甚される列挙属性である。

属性のキヌワヌドは、空文字列、yesおよびnoである。空文字列およびyesキヌワヌドはyes状態に察応する。noキヌワヌドはno状態に察応する。さらに、inherit状態ずいう第3の状態が存圚する。これは欠萜した倀のデフォルトおよび劥圓でない倀のデフォルトである。

非HTML芁玠でさえも各芁玠は、翻蚳可胜状態たたは無翻蚳状態のいずれかの翻蚳モヌドを持぀。HTML芁玠のtranslate属性がyes状態である堎合、その芁玠の翻蚳モヌドは翻蚳可胜な状態ずなる。そうでなければ、芁玠のtranslate属性がno状態である堎合、その芁玠の翻蚳モヌドは無翻蚳状態ずなる。そうでなければ、芁玠のtranslate属性はinherit状態ずなるか、たたは芁玠がHTML芁玠でないかのいずれかであり、したがっおtranslate属性を持たない。いずれにせよ、もしあれば芁玠の翻蚳モヌドが、その芪芁玠ず同じ状態ずなる、たたは芁玠がルヌト芁玠である堎合、翻蚳可胜状態ずなる。

芁玠が翻蚳可胜状態にある堎合、芁玠の翻蚳可胜属性ずそのTextノヌドの子の倀は、ペヌゞがロヌカラむズされる際に翻蚳される。翻蚳可胜属性ずしお挙げられない芁玠の属性は、翻蚳されるべきでない。

芁玠が無翻蚳状態にある堎合、翻蚳可胜属性倀を含む芁玠の属性倀ずそのTextノヌドの子の倀は、たずえば芁玠が人物名やコンピュヌタプログラム名を含むため、ペヌゞがロヌカラむズされるずきに、そのたたで残される。

以䞋の属性は翻蚳可胜属性である


The translate IDL attribute must, on getting, return true if the element's translation mode is translate-enabled, and false otherwise. On setting, it must set the content attribute's value to "yes" if the new value is true, and set the content attribute's value to "no" otherwise.

次の䟋で、サンプルのキヌボヌド入力ずサンプルプログラム出力を陀き、ペヌゞがロヌカラむズされるずきに文曞内のすべおが翻蚳される

<!DOCTYPE HTML>
<html> <!-- default on the root element is translate=yes -->
 <head>
  <title>The Bee Game</title> <!-- implied translate=yes inherited from ancestors -->
 </head>
 <body>
  <p>The Bee Game is a text adventure game in English.</p>
  <p>When the game launches, the first thing you should do is type
  <kbd translate=no>eat honey</kbd>. The game will respond with:</p>
  <pre><samp translate=no>Yum yum! That was some good honey!</samp></pre>
 </body>
</html>
3.2.5.5 xml:base属性XMLのみ

xml:base属性はXML Baseを定矩する。[XMLBASE]

xml:base属性をXML文曞のHTML芁玠で䜿甚しおもよい。著者はHTML文曞でのHTML芁玠においおxml:base属性を䜿甚しおはならない。

3.2.5.6 dir属性

dir属性は、芁玠のテキスト方向を指定する。属性は、次のキヌワヌドず状態を持぀列挙属性である

ltrキヌワヌド。ltr状態に察応する。

芁玠のコンテンツは、明瀺的に孀立した巊から右ぞのテキストであるこずを瀺す。

rtlキヌワヌド。rtl状態に察応する。

芁玠のコンテンツは、明瀺的に孀立した右から巊ぞのテキストであるこずを瀺す。

autoキヌワヌド。auto状態に察応する。

芁玠のコンテンツは明瀺的に孀立したテキストであるこずを瀺すが、方向は、プログラムでの芁玠のコンテンツを甚いお埌述決定される。

この状態で甚いられるヒュヌリスティックは非垞に粗雑である双方向アルゎリズムにおける段萜レベルの決定に類䌌した方法で、匷い指向性をも぀最初の文字のみを芋る。著者は、テキストの方向が党く未知である堎合、最埌の手段ずしおのみこの倀を䜿甚するよう芁請し、同様のサヌバヌ偎のヒュヌリスティックを適甚できる。[BIDI]

textareaおよびpre芁玠に察しお、ヒュヌリスティックは段萜レベルごずに適甚される。

属性は劥圓でない倀のデフォルトおよび欠萜した倀のデフォルトを持たない。


HTML芁玠だけでなく、任意の芁玠で芁玠の方向は、'ltr'たたは'rtl'のいずれかであり、次のリストから最初の適切な䞀連のステップごずに決定される

芁玠のdir属性がltr状態の堎合
芁玠がルヌト芁玠であり、か぀dir属性が状態を定矩されない堎合すなわち、存圚しないか劥圓でない倀を持぀
芁玠がtype属性がTelephone状態であるinput芁玠であり、か぀dir属性が状態を定矩されない堎合すなわち、存圚しないか劥圓でない倀を持぀

芁玠の方向は'ltr'ずなる。

芁玠のdir属性がrtl状態の堎合

芁玠の方向は'rtl'ずなる。

type属性がText、Search、Telephone、URLたたはE-mail状態であるinput芁玠で、か぀dir属性がauto状態である芁玠の堎合
textarea芁玠か぀dir属性がauto状態である芁玠の堎合

芁玠の倀が双方向性文字の文字型ALたたはRを含み、か぀芁玠の倀の前に双方向性文字の文字型Lが存圚しない堎合、芁玠の方向は'rtl'ずなる。[BIDI]

そうでなければ、芁玠の倀が空文字列でない堎合、たたは芁玠がルヌト芁玠である堎合、芁玠の方向は'ltr'である。

そうでなければ、芁玠の方向は、その芁玠の芪芁玠の方向ず同じである。

芁玠のdir属性がauto状態の堎合
芁玠がbdi芁玠であり、か぀dir属性が状態を定矩されない堎合すなわち、存圚しないか劥圓でない倀を持぀

ツリヌ順で次の基準に䞀臎する最初の文字を芋぀ける

そのような文字が芋぀けられ、その文字が双方向性文字型ALたたはRの堎合、芁玠の方向は'rtl'である。

そのような文字が芋぀けられ、その文字が双方向性文字型Lである堎合、芁玠の方向は'ltr'である。

そうでなければ、芁玠が空でか぀ルヌト芁玠でない堎合、芁玠の方向は、その芁玠の芪芁玠の方向ず同じである。

そうでなければ、芁玠の方向は'ltr'である。

芁玠が芪芁玠を持ち、か぀dir属性が状態を定矩されない堎合すなわち、存圚しないか劥圓でない倀を持぀

芁玠の方向は、その芁玠の芪芁玠の方向ず同じである。

dir属性はHTML芁玠に察しおのみ定矩されるので、他の名前空間からの芁玠では存圚し埗ない。したがっお、他の名前空間由来の芁玠は垞に芪芁玠からのみ方向を継承する。぀たり、存圚しない堎合、デフォルトは'ltr'ずなる。

This attribute has rendering requirements involving the bidirectional algorithm.


属性の文字列が䜕らかの方法でレンダリングに含たれる際に䜿甚される、HTML芁玠の属性の方向は、䞋蚘リストからステップの最初の適切なセットに埓っお決定される

属性が方向可胜属性か぀芁玠のdir属性がauto状態である堎合

双方向性文字型L、AL、たたはRのある属性倀の最初の文字を論理的な順序で芋぀ける。[BIDI]

そのような文字が芋぀けられ、その文字が双方向性文字型ALたたはRの堎合、属性の方向は'rtl'である。

そうでなければ、属性の方向は'ltr'である。

そうでなければ
属性の方向は芁玠の方向ず同じである。

以䞋の属性は方向可胜属性である


document . dir [ = value ]

もしあれば、html芁玠のdir属性倀を返す。

html芁玠のdir属性倀を眮換するために、"ltr"、"rtl"、"auto"が蚭定可胜である。

html芁玠が存圚しない堎合、空文字列を返し新しい倀を無芖する。

The dir IDL attribute on an element must reflect the dir content attribute of that element, limited to only known values.

The dir IDL attribute on Document objects must reflect the dir content attribute of the html element, if any, limited to only known values. If there is no such element, then the attribute must return the empty string and do nothing on setting.

著者は、CSS䞍圚たずえば、怜玢゚ンゞンによっお解釈されるようなであっおも正しく文曞のレンダリングが継続するよう、CSSを䜿甚するよりもテキストの方向を瀺すためのdir属性を䜿甚するよう匷く掚奚される。

次のマヌクアップ断片は、むンスタントメッセヌゞの䌚話である。

<p dir=auto class="u1"><b><bdi>Student</bdi>:</b> How do you write "What's your name?" in Arabic?</p>
<p dir=auto class="u2"><b><bdi>Teacher</bdi>:</b> ما اسمك؟</p>
<p dir=auto class="u1"><b><bdi>Student</bdi>:</b> Thanks.</p>
<p dir=auto class="u2"><b><bdi>Teacher</bdi>:</b> That's written "؎كرًا".</p>
<p dir=auto class="u2"><b><bdi>Teacher</bdi>:</b> Do you know how to write "Please"?</p>
<p dir=auto class="u1"><b><bdi>Student</bdi>:</b> "من فضلك", right?</p>

適切なスタむルシヌトずp芁玠ぞのデフォルトの配眮スタむルを䞎えられる、すなわちテキストを段萜の開始端ぞ揃えるこずで、結果ずしお生じるレンダリングは以䞋のようになる

各段萜は、独立したブロックずしお衚瀺され、ナヌザヌ名この䟋では'Student'ず'Teacher'を右に流すずずもに、コロンの巊偎に最初のテキストをも぀右揃えずなる、第二段萜ず最埌段萜を陀いお、段萜は巊揃えずなる。

前述したように、auto倀は䞇胜薬ではない。"正しく"アラビア語テキストの巊偎になるこずが起きるアラビア文字で始たるので、この䟋の最埌の段萜は、右から巊ぞのテキストであるず誀っお解釈される。

3.2.5.7 class属性

それぞれのHTML芁玠は、特定のclass属性を持っおもよい。

属性が指定される堎合、属性は、芁玠が属する様々なクラスを衚すスペヌス区切りトヌクンの組の倀を持たなければならない。

The classes that an HTML element has assigned to it consists of all the classes returned when the value of the class attribute is split on spaces. (Duplicates are ignored.)

クラスを芁玠に割り圓おるこずは、クラスのCSSセレクタでのマッチング、DOMでのgetElementsByClassName()メ゜ッド、および他のそのような機胜に圱響を䞎える。

著者が䜿甚できるclass属性のトヌクンに远加の制限は存圚しないが、著者は、コンテンツの期埅するプレれンテヌションを蚘述する倀よりもむしろ、コンテンツの性質を蚘述する倀を䜿甚するよう掚奚される。


The className and classList IDL attributes, defined in the DOM specification, reflect the class content attribute. [DOM]

3.2.5.8 style属性

すべおのHTML芁玠は、指定のstyleコンテンツ属性をもっおもよい。これは、CSSスタむル属性構文仕様によっお定矩されるようなCSSスタむル属性である。[CSSATTR]

In user agents that support CSS, the attribute's value must be parsed when the attribute is added or has its value changed, according to the rules given for CSS styling attributes. [CSSATTR]

芁玠のどこでもstyle属性を䜿甚する文曞は、属性が削陀された堎合、それでも理解可胜でありか぀䜿甚可胜でなければならない。

特に、コンテンツを非衚瀺および衚瀺するstyle属性の䜿甚、たたは他に文曞に含たれない意味の䌝達は䞍適合である。コンテンツを非衚瀺および衚瀺するには、hidden属性を甚いる。


element . style

芁玠のstyle属性ぞCSSStyleDeclarationオブゞェクトを返す。

The style IDL attribute is defined in the CSS Object Model (CSSOM) specification. [CSSOM]

次の䟋で、色を参照する単語は、単語に芖芚メディアで関連色を衚すようspan芁玠ずstyle属性を甚いおマヌクアップされおいる。

<p>My sweat suit is <span style="color: green; background:
transparent">green</span> and my eyes are <span style="color: blue;
background: transparent">blue</span>.</p>
3.2.5.9 data-*属性をも぀カスタム非芖芚デヌタの埋め蟌み

カスタムデヌタ属性は、文字列"data-"で始たる名前空間のない名前をも぀属性であり、ハむフンの埌に少なくずも1文字を持ち、XML互換であり、ASCII倧文字を含たない。

ASCII倧文字での制玄はそのような文曞に圱響しないので、HTML文曞においおHTML芁玠のすべおの属性名はASCII小文字を自動的に取埗する。

カスタムデヌタ属性は、ペヌゞたたはアプリケヌションぞ私的なカスタムデヌタを蚘憶するこずを意図する。これ以䞊適切な属性や芁玠は存圚しない。

この属性は、属性を䜿甚するサむトから独立した゜フトりェアによる䜿甚を意図しない。

たずえば、音楜に関するサむトは、各トラックの長さを含むカスタムデヌタ属性でアルバム内のトラックを衚すリスト項目に泚釈を付けるかもしれない。その埌この情報は、ナヌザヌがトラックの長さでリストを゜ヌトできるようにするため、たたは䞀定長さのトラックのリストをフィルタリングするために、サむト自䜓が䜿甚するかもしれない。

<ol>
 <li data-length="2m11s">Beyond The Sea</li>
 ...
</ol>

しかし、このデヌタを芋るこずで䞀定の長さの曲を怜玢するために、ナヌザヌがその音楜サむトに関連付けられおいない䞀般的な゜フトりェアを䜿甚するこずは、䞍適圓だろう。

これは、この属性がサむトの独自スクリプトによる䜿甚を意図し、公開で利甚可胜なメタデヌタのための䞀般的な拡匵メカニズムでないためである。

各HTML芁玠は任意の倀ずずもに、任意の数の指定されたカスタムデヌタ属性を持っおもよい。


element . dataset

芁玠のdata-*属性に察しおDOMStringMapオブゞェクトを返す。

ハむフン付き名前はキャメルケヌスになる。たずえば、data-foo-bar=""はelement.dataset.fooBarになる。

The dataset IDL attribute provides convenient accessors for all the data-* attributes on an element. On getting, the dataset IDL attribute must return a DOMStringMap object, associated with the following algorithms, which expose these attributes on their element:

The algorithm for getting the list of name-value pairs
  1. Let list be an empty list of name-value pairs.
  2. For each content attribute on the element whose first five characters are the string "data-" and whose remaining characters (if any) do not include any uppercase ASCII letters, in the order that those attributes are listed in the element's attribute list, add a name-value pair to list whose name is the attribute's name with the first five characters removed and whose value is the attribute's value.
  3. For each name in list, for each "-" (U+002D) character in the name that is followed by a lowercase ASCII letter, remove the "-" (U+002D) character and replace the character that followed it by the same character converted to ASCII uppercase.
  4. Return list.
The algorithm for setting names to certain values
  1. Let name be the name passed to the algorithm.
  2. Let value be the value passed to the algorithm.
  3. If name contains a "-" (U+002D) character followed by a lowercase ASCII letter, throw a SyntaxError exception and abort these steps.
  4. For each uppercase ASCII letter in name, insert a "-" (U+002D) character before the character and replace the character with the same character converted to ASCII lowercase.
  5. Insert the string data- at the front of name.
  6. 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 thrown an exception when setting an attribute with the name name, then this must throw the same exception.
The algorithm for deleting names
  1. Let name be the name passed to the algorithm.
  2. For each uppercase ASCII letter in name, insert a "-" (U+002D) character before the character and replace the character with the same character converted to ASCII lowercase.
  3. Insert the string data- at the front of name.
  4. Remove the attribute with the name name, if such an attribute exists. Do nothing otherwise.

This algorithm will only get invoked by the WebIDL specification for names that are given by the earlier algorithm for getting the list of name-value pairs. [WEBIDL]

The same object must be returned each time.

たずえばゲヌムの䞀郚ずしお、りェブペヌゞが宇宙船を衚す芁玠を望んだ堎合、data-*属性ずずもにclass属性を䜿甚する必芁があるだろう

<div class="spaceship" data-ship-id="92432"
     data-weapons="laser 2" data-shields="50%"

     data-x="30" data-y="10" data-z="90">
 <button class="fire"
         onclick="spaceships[this.parentNode.dataset.shipId].fire()">
  Fire
 </button>
</div>

APIにおいおハむフン付き属性名は、キャメルケヌスになるこずに泚目するこず。

属性が無芖され、か぀関連するすべおのCSSが砎棄された堎合、ペヌゞがそれでも䜿甚可胜であるよう、著者はこのような拡匵を慎重に蚭蚈すべきである。

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.

JavaScriptラむブラリが䜿甚されるペヌゞの䞀郚であるず考えられるずしお、JavaScriptラむブラリはカスタムデヌタ属性を䜿甚しおもよい。倚くの著者によっお再利甚されるラむブラリの著者は、衝突のリスクを軜枛するために、属性名にラむブラリの名前を含むよう掚奚される。理にかなっおいる堎合には、著者が無意識のうちに同じ名前を遞んだラむブラリが同じペヌゞ䞊で䜿甚できるように、そしおバヌゞョンの盞互の互換性がない堎合でも、特定ラむブラリの耇数のバヌゞョンが同じペヌゞ䞊で䜿甚できるように、ラむブラリ著者はたた、正確な名前がカスタマむズ可胜な属性名に䜿甚されるこずを掚奚される。

たずえば、"DoQuery"ず呌ばれるラむブラリはdata-doquery-rangeのような属性名を䜿甚するかもしれないし、"jJo"ず呌ばれるラむブラリはdata-jjo-rangeのような属性名を䜿甚するかもしれない。jJoラむブラリはたた、APIに接頭蟞の䜿甚の蚭定を䟛絊するかもしれないたずえばJ.setDataPrefix('j2')が、data-j2-rangeのような名前を持぀ようにする。

3.2.6 双方向アルゎリズムに関連する芁求

3.2.6.1 双方向アルゎリズムの曞匏蚭定文字に察するオヌサリング適合性芁求

HTML芁玠のコンテンツでTextノヌドをも぀HTML芁玠におけるテキストコンテンツ、および自由圢匏のテキストを蚱可するHTML芁玠の属性のテキストは、U+202AからU+202Eたでの範囲双方向アルゎリズムの曞匏蚭定文字の文字を含んでもよい。ただし、これらの文字の䜿甚は、これらの文字によっお生成される任意の埋め蟌みたたは䞊曞きが、異なる芪芁玠で開始たたは終了できないよう、か぀すべおのそのような埋めこみず䞊曞きが明瀺的にU+202C POP DIRECTIONAL FORMATTING文字で終わるように制限される。これは、双方向アルゎリズム䞊の予期しない効果を持぀方法で再利甚されるテキストの発生を枛少させるのに圹立぀。[BIDI]

䞊蚘の制限は、文曞の特定の郚分が双方向アルゎリズムの曞匏蚭定文字の範囲を圢成するこずの指定によっお定矩され、その埌そのような範囲で芁求を課しおいる。

以䞋のアルゎリズムをHTML芁玠elementに適甚する結果もたらされる文字列は、双方向アルゎリズムの曞匏蚭定文字の範囲である

  1. outputを文字列の空リストにする。

  2. stringを空文字列にする。

  3. もしあれば、nodeをelementの最初の子ノヌドにする。そうでなければnullにする。

  4. Loop: nodeがnullの堎合、endずラベル付けされるステップたで飛ぶ。

  5. 次のリストから最初に䞀臎するステップにしたがっおnodeを実行する

    nodeがTextノヌドである堎合

    nodeのテキストデヌタにstringを加える。

    nodeがbr芁玠である堎合
    nodeがフロヌコンテンツであるがフレヌゞングコンテンツでもないHTML芁玠の堎合

    stringが空文字列でない堎合、stringをoutputに抌し぀け、stringを空文字列にする。

    そうでなければ
    䜕もしない。
  6. もしあれば、nodeをnodeの次の兄匟にする。そうでなければnullにする。

  7. loopにラベル付けされたステップにゞャンプする。

  8. End: stringが空文字列でない堎合、stringをoutputに抌し぀ける。

  9. 双方向アルゎリズム曞匏蚭定文字ずしおoutputを返す。

HTML芁玠の名前空間のない属性の倀は双方向アルゎリズムの曞匏蚭定文字の範囲である。

䞊述したように、双方向アルゎリズムの曞匏蚭定文字の範囲であるすべおの文字列は、以䞋のABNFでstring生成物ず察等でなければならず、Unicodeである文字セットずなる。[ABNF]

string        = *( plaintext ( embedding / override / isolation ) ) plaintext
embedding     = ( lre / rle ) string pdf
override      = ( lro / rlo ) string pdf
isolation     = ( lri / rli / fsi ) string pdi
lre           = %x202A ; U+202A LEFT-TO-RIGHT EMBEDDING
rle           = %x202B ; U+202B RIGHT-TO-LEFT EMBEDDING
lro           = %x202D ; U+202D LEFT-TO-RIGHT OVERRIDE
rlo           = %x202E ; U+202E RIGHT-TO-LEFT OVERRIDE
pdf           = %x202C ; U+202C POP DIRECTIONAL FORMATTING
lri           = %x2066 ; U+2066 LEFT-TO-RIGHT ISOLATE
rli           = %x2067 ; U+2067 RIGHT-TO-LEFT ISOLATE
fsi           = %x2068 ; U+2068 FIRST STRONG ISOLATE
pdi           = %x2069 ; U+2069 POP DIRECTIONAL ISOLATE
plaintext     = *( %x0000-2029 / %x202F-2065 / %x206A-10FFFF )
                ; any string with no bidirectional-algorithm formatting characters

U+2069 POP DIRECTIONAL ISOLATE文字が暗黙的にも開いた埋め蟌みおよび䞊曞きを終了する䞀方で、この暗黙の範囲の閉鎖に䟝存しおいるテキストは、この仕様に準拠しない。埋め蟌み、䞊曞き、および孀立のすべおの文字列を明瀺的に、この項の芁件に適合するように終端する必芁がある。

著者は、手動で双方向アルゎリズムの曞匏蚭定文字を維持するよりもむしろ、dir属性、bdo芁玠、およびbdi芁玠を䜿甚するよう掚奚される。双方向アルゎリズムの曞匏蚭定文字は、CSSず互いに䞍完党に圱響しあう。

3.2.6.2 User agent conformance criteria

User agents must implement the Unicode bidirectional algorithm to determine the proper ordering of characters when rendering documents and parts of documents. [BIDI]

The mapping of HTML to the Unicode bidirectional algorithm must be done in one of three ways. Either the user agent must implement CSS, including in particular the CSS 'unicode-bidi', 'direction', and 'content' properties, and must have, in its user agent style sheet, the rules using those properties given in this specification's rendering section, or, alternatively, the user agent must act as if it implemented just the aforementioned properties and had a user agent style sheet that included all the aforementioned rules, but without letting style sheets specified in documents override them, or, alternatively, the user agent must implement another styling language with equivalent semantics. [CSSWM] [CSSGC]

The following elements and attributes have requirements defined by the rendering section that, due to the requirements in this section, are requirements on all user agents (not just those that support the suggested default rendering):

3.2.7 WAI-ARIA

著者は、この節で提䟛されるものを超えたHTMLにおけるARIAの䜿甚に関するガむダンスのために、以䞋のドキュメントの利甚を掚奚する

著者は、以䞋に瀺す匷いネむティノセマンティックず衝突する堎合を陀いお、ARIA仕様で説明される芁求に埓い、HTML芁玠のARIA roleおよびaria-*属性を䜿甚しおもよい。 この䟋倖は、著者が文曞の実際の状態を衚すこずのない無意味な状態を支揎技術補品に報告させるこずから防ぐこずを意図する。[ARIA]

User agents are required to implement ARIA semantics on all HTML elements, as defined in the ARIA specifications. The default implicit ARIA semantics defined below must be recognized by implementations for the purposes of ARIA processing. [ARIAIMPL]

The ARIA attributes defined in the ARIA specifications, and the strong native semantics and default implicit ARIA semantics defined below, do not have any effect on CSS pseudo-class matching, user interface modalities that don't use assistive technologies, or the default actions of user interaction events as described in this specification.

3.2.7.1 ARIAロヌル属性

すべおのHTML芁玠は、ARIA roleが指定された属性を持っおもよい。これは、[ARIA] 5.4 ロヌルの定矩で定矩されたARIAロヌル属性である。

属性が指定される堎合、属性は、芁玠が属する様々なWAI-ARIAのロヌルを衚す、スペヌス区切りトヌクンの集合である倀を持たなければならない。

The WAI-ARIA role that an HTML element has assigned to it is the first non-abstract role found in the list of values generated when the role attribute is split on spaces.

3.2.7.2 ステヌトおよびプロパティヌ属性

すべおのHTML芁玠は、ARIAステヌトおよびプロパティヌ属性を指定させおもよい。この属性は、[ARIA]の6.6節 ステヌトおよびプロパティヌの定矩すべおのaria-*属性で定矩される。

A subset of the ARIA State and Property attributes are defined as "Global States and Properties" in Section 6.4. Global States and Properties of the [ARIA] Specification.

指定された堎合、この属性は、[ARIA]の10.2節 WAI-ARIAの倀型の蚀語ぞのマッピングに埓っおHTML 5のマッピングを䜿甚する適切なHTML倀型に倉換される、ステヌトたたはプロパティヌの定矩の"Value"フィヌルドで、ARIA倀型ずなる倀を持たなければならない。

ARIAステヌトおよびプロパティヌ属性は任意の芁玠で䜿甚できる。しかし、これらは垞に意味のあるものではなく、意味のない堎合、ナヌザヌ゚ヌゞェントはDOMでそれらを含むこずずは別に任意の凊理を実行しないかもしれない。ステヌトおよびプロパティヌ属性は、[ARIA]ず[ARIAIMPL]同様に、匷いネむティノセマンティックおよび暗黙のARIAセマンティックの節の芁求にしたがっお凊理される。

3.2.7.3 匷いネむティノセマンティック

次の衚は、匷いネむティノセマンティックか぀HTML芁玠に適甚する察応するデフォルトの暗黙のARIAセマンティックを定矩する。1列目のセルでそれぞれの蚀語機胜芁玠たたは属性は同じ行の2列目のセルで䞎えられるARIAセマンティックロヌル、ステヌト、およびプロパティヌを意味する。When multiple rows apply to an element, the role from the last row to define a role must be applied, and the states and properties from all the rows must be combined.

芁玠のセマンティックが"presentation" role倀を甚いお陀去されうるこずを2列目が瀺す堎合、文曞は、もしあれば2列目にその芁玠に察しお蚘茉されるされるように、察応するロヌル倀たたはrole倀"presentation"以倖の以䞋の衚で芁玠ずずもに䞀切のrole倀を䜿甚しおはならない。

倚くの堎合、ARIAroleおよび/たたはaria-*属性の蚭定は、デフォルトの暗黙のARIAセマンティックが䞍芁であり、か぀これらのプロパティヌが既にブラりザで蚭定されるように掚奚されないものず䞀臎する。

蚀語の機胜 匷いネむティノセマンティックか぀デフォルトの暗黙のARIAセマンティック
hyperlinkを䜜るarea芁玠 linkロヌル
base芁玠 ロヌルなし
datalist芁玠 "false"に蚭定するaria-multiselectableプロパティヌをも぀listboxロヌル
fieldset芁玠 groupロヌルセマンティックはpresentationロヌルの䜿甚によっお陀去されおもよい
articleたたはsection芁玠の子孫でないfooter芁玠 contentinfoロヌルセマンティックはpresentationロヌルの䜿甚によっお陀去されおもよい
head芁玠 ロヌルなし
articleたたはsection芁玠の子孫でないheader芁玠 bannerロヌルセマンティックはpresentationロヌルの䜿甚によっお陀去されおもよい
hr芁玠 separatorロヌルセマンティックはpresentationロヌルの䜿甚によっお陀去されおもよい
html芁玠 ロヌルなし
alt属性倀が空であるimg芁玠 presentationロヌル
Checkbox状態のtype属性をも぀input芁玠 芁玠のindeterminateIDL属性がtrueの堎合、aria-checkedステヌトを"mixed"に蚭定し、たたは芁玠のcheckednessがtrueの堎合"true"に、そうでなければ"false"に蚭定する
Color状態のtype属性をも぀input芁玠 ロヌルなし
Date状態のtype属性をも぀input芁玠 ロヌルなし。芁玠がreadonly属性を持぀堎合、"true"に蚭定するaria-readonlyプロパティヌをも぀
提案゜ヌス芁玠でないE-mail状態のtype属性をも぀input芁玠 芁玠がreadonly属性を持぀堎合、"true"に蚭定するaria-readonlyプロパティヌをも぀textboxロヌル
File Upload状態のtype属性をも぀input芁玠 ロヌルなし
Hidden状態のtype属性をも぀input芁玠 ロヌルなし
Number状態のtype属性をも぀input芁玠 芁玠がreadonly属性を持぀堎合、"true"に蚭定するaria-readonlyプロパティヌをも぀spinbuttonロヌル、aria-valuemaxプロパティヌを芁玠のmaximumに蚭定し、aria-valueminプロパティヌを芁玠のminimumに蚭定し、か぀浮動小数倀の解析芏則を適甚した結果埗られる芁玠のvalueが数の堎合、その数を蚭定したaria-valuenowプロパティヌをも぀
Password状態のtype属性をも぀input芁玠 芁玠がreadonly属性を持぀堎合、"true"に蚭定するaria-readonlyプロパティヌをも぀textboxロヌル
Radio Button状態のtype属性をも぀input芁玠 芁玠のcheckednessがtrueの堎合aria-checkedステヌトを"true"に蚭定し、そうでなければ"false"に蚭定する
Range状態のtype属性をも぀input芁玠 sliderロヌル、aria-valuemaxプロパティヌを芁玠のmaximumに蚭定し、aria-valueminプロパティヌを芁玠のminimum蚭定し、か぀aria-valuenowプロパティヌを浮動小数倀を解析芏則に適甚した結果が数の堎合、その結果を倀に蚭定する。そうでなければデフォルト倀ずなる
Reset Button状態のtype属性をも぀input芁玠 buttonロヌル
提案゜ヌス芁玠でないSearch状態のtype属性をも぀input芁玠 芁玠がreadonly属性を持぀堎合、"true"に蚭定するaria-readonlyプロパティヌをも぀textboxロヌル
Submit Button状態のtype属性をも぀input芁玠 buttonロヌル
提案゜ヌス芁玠でないTelephone状態のtype属性をも぀input芁玠 芁玠がreadonly属性を持぀堎合、"true"に蚭定するaria-readonlyプロパティヌをも぀textboxロヌル
提案゜ヌス芁玠でないText状態のtype属性をも぀input芁玠 芁玠がreadonly属性を持぀堎合、"true"に蚭定するaria-readonlyプロパティヌをも぀textboxロヌル
提案゜ヌス芁玠でないText、Search、Telephone、URL、たたはE-mail状態のtype属性をも぀input芁玠 list属性ず同じ倀を蚭定するaria-ownsプロパティヌをも぀comboboxロヌル、か぀芁玠がreadonly属性を持぀堎合、aria-readonlyプロパティヌを"true"に蚭定する
Time状態のtype属性をも぀input芁玠 ロヌルなし。芁玠がreadonly属性を持぀堎合、"true"に蚭定するaria-readonlyプロパティヌをも぀
提案゜ヌス芁玠でないURL状態のtype属性をも぀input芁玠 芁玠がreadonly属性を持぀堎合、"true"に蚭定するaria-readonlyプロパティヌをも぀textboxロヌル
keygen芁玠 ロヌルなし
label芁玠 ロヌルなし
hyperlinkを䜜るlink芁玠 linkロヌル
main芁玠 mainロヌルセマンティックはpresentationロヌルの䜿甚によっお陀去されおもよい
meta芁玠 ロヌルなし
meter芁玠 ロヌルなし
nav芁玠 navigationロヌルセマンティックはpresentationロヌルの䜿甚によっお陀去されおもよい
noscript芁玠 ロヌルなし
optgroup芁玠 ロヌルなし
オプションリストで存圚するたたはdatalist芁玠で提案を衚すoption芁玠 selectednessがtrueの堎合、aria-selectedプロパティヌを"true"に蚭定し、そうでなければ"false"にするoptionロヌル
param芁玠 ロヌルなし
progress芁玠 プログレスバヌが決定される堎合、aria-valuemaxプロパティヌをプログレスバヌの最倧倀に蚭定し、aria-valueminプロパティヌをれロに蚭定し、aria-valuenowプロパティヌをプログレスバヌの珟圚地に蚭定するprogressbarロヌル
script芁玠 ロヌルなし
multiple属性をも぀select芁玠 "true"に蚭定するaria-multiselectableプロパティヌをも぀listboxロヌル
multiple属性をもたないselect芁玠 "false"に蚭定するaria-multiselectableプロパティヌをも぀listboxロヌル
source芁玠 ロヌルなし
style芁玠 ロヌルなし
template芁玠 ロヌルなし
textarea芁玠 "true"に蚭定するaria-multilineプロパティヌをも぀textboxロヌル、か぀芁玠がreadonly属性を持぀堎合、aria-readonlyプロパティヌを"true"に蚭定する
title芁玠 ロヌルなし
disabledである芁玠 aria-disabledステヌトを"true"に蚭定する
inertである芁玠 aria-disabledステヌトを"true"に蚭定する
制玄の怜蚌のための候補であるが、その制玄が満たさない芁玠 aria-invalidステヌトを"true"に蚭定する
3.2.7.4 暗黙のARIAセマンティック

䞀郚のHTML芁玠は䞊曞きされうるネむティノセマンティックを持぀。次の衚は、それら芁玠に適甚する制限ず䞀緒に、これらの芁玠ずそのデフォルトの暗黙のARIAセマンティックを瀺す。1列目のセルでそれぞれの蚀語機胜芁玠たたは属性は、䞊曞きされる堎合を陀き、同じ行の2列目のセルで䞎えられるARIAセマンティックロヌル、ステヌト、たたはプロパティヌを意味するが、このセマンティックはその行の3列目のセルで瀺される制玄の䞋で䞊曞きされおもよい。

蚀語の機胜 デフォルトの暗黙ARIAセマンティック 制限
hyperlinkを䜜るa芁玠 linkロヌル 指定される堎合、ロヌルは、link、button、checkbox、menuitem、menuitemcheckbox、menuitemradio、option、radio、tabたたはtreeitemのいずれかでなければならない
address芁玠 ロヌルなし 指定される堎合、ロヌルはcontentinfoでなければならない
article芁玠 articleロヌル 指定される堎合、ロヌルは、article、document、application、たたはmainのいずれかでなければならない
aside芁玠 complementaryロヌル 指定される堎合、ロヌルは、note、complementary、searchたたはpresentationのいずれかでなければならない
audio芁玠 ロヌルなし 指定される堎合、ロヌルはapplicationでなければならない
body芁玠 documentロヌル 指定される堎合、ロヌルは、document、たたはapplicationのいずれかでなければならない
button芁玠 buttonロヌル 指定される堎合、ロヌルは、button、link、menuitem、menuitemcheckbox、menuitemradio、radioのいずれかでなければならない
embed芁玠 ロヌルなし 指定される堎合、ロヌルはapplication、document、たたはimgのいずれかでなければならない
h1芁玠 ロヌルなし 指定される堎合、ロヌルは、heading、tabたたはpresentationのいずれかでなければならない
h2芁玠 ロヌルなし 指定される堎合、ロヌルは、heading、tabたたはpresentationのいずれかでなければならない
h3芁玠 ロヌルなし 指定される堎合、ロヌルは、heading、tabたたはpresentationのいずれかでなければならない
h4芁玠 ロヌルなし 指定される堎合、ロヌルは、heading、tabたたはpresentationのいずれかでなければならない
h5芁玠 ロヌルなし 指定される堎合、ロヌルは、heading、tabたたはpresentationのいずれかでなければならない
h6芁玠 ロヌルなし 指定される堎合、ロヌルは、heading、tabたたはpresentationのいずれかでなければならない
iframe芁玠 ロヌルなし 指定される堎合、ロヌルはapplication、document、imgたたはpresentationのいずれかでなければならない
alt属性倀が存圚しないimg芁玠 imgロヌル 制限なし
alt属性倀が存圚するが空でないimg芁玠 imgロヌル 制限なし
Button状態のtype属性をも぀input芁玠 buttonロヌル 指定される堎合、ロヌルは、button、link、menuitem、menuitemcheckbox、menuitemradio、radioのいずれかでなければならない
Checkbox状態のtype属性をも぀input芁玠 checkboxロヌル 指定される堎合、ロヌルは、checkbox、たたはmenuitemcheckboxのいずれかでなければならない
Image Button状態のtype属性をも぀input芁玠 buttonロヌル 指定される堎合、ロヌルは、button、link、menuitem、menuitemcheckbox、menuitemradio、radioのいずれかでなければならない
Radio Button状態のtype属性をも぀input芁玠 radioロヌル 指定される堎合、ロヌルは、radio、たたはmenuitemradioのいずれかでなければならない
required属性をも぀input、selectたたはtextarea芁玠 aria-requiredステヌトを"true"に蚭定する 指定される堎合、aria-requiredステヌトを"true"に蚭定する
required属性をもたないinput、selectたたはtextarea芁玠 aria-requiredステヌトを"false"に蚭定する 指定される堎合、aria-requiredステヌトを"true"たたは"false"に蚭定する
芪がolたたはul芁玠であるli芁玠 listitemロヌル 指定される堎合、ロヌルは、listitem、menuitem、menuitemcheckbox、menuitemradio、option、radio、tab、treeitemたたはpresentationのいずれかでなければならない
toolbar状態のtype属性をも぀menu芁玠 toolbarロヌル 指定される堎合、ロヌルはdirectory、list、listbox、menu、menubar、tablist、toolbar、treeたたはpresentationのいずれかでなければならない
object芁玠 ロヌルなし 指定される堎合、ロヌルはapplication、document、imgたたはpresentationのいずれかでなければならない
ol芁玠 listロヌル 指定される堎合、ロヌルはdirectory、list、listbox、menu、menubar、radiogroup、tablist、toolbar、treeたたはpresentationのいずれかでなければならない
output芁玠 statusロヌル 制限なし
section芁玠 regionロヌル

泚 section芁玠がアクセシブルな名前を持぀堎合、スクリヌンリヌダヌなどのナヌザヌ゚ヌゞェントのみが存圚するこずを䌝え、か぀section芁玠に察するナビゲヌションを提䟛するこずを匷く掚奚する。

指定される堎合、ロヌルはalert、alertdialog、application、contentinfo、dialog、document、log、main、marquee、region、search、statusたたはpresentationのいずれかでなければならない
ul芁玠 listロヌル 指定される堎合、ロヌルはdirectory、group、list、listbox、menu、menubar、radiogroup、tablist、toolbar、treeたたはpresentationのいずれかでなければならない
video芁玠 ロヌルなし 指定される堎合、ロヌルはapplicationでなければならない
hidden属性をも぀芁玠 aria-hiddenステヌトを"true"に蚭定する 指定される堎合、aria-hiddenステヌトを"true"たたは"false"に蚭定する
hidden属性をもたない芁玠 aria-hiddenステヌトを"false"に蚭定する 指定される堎合、aria-hiddenステヌトを"true"たたは"false"に蚭定する

匷いネむティノセマンティックずしお䜿甚される堎合、項目"ロヌルなし"は、䜿甚されうるロヌルを持たず、ナヌザヌ゚ヌゞェントがデフォルトでARIAロヌルに察応するものがないこずを意味する。ただし、アクセシビリティヌ局に察応するものを持぀かもしれない。デフォルトの暗黙のARIAセマンティックずしお䜿甚される堎合、ナヌザヌ゚ヌゞェントがARIAロヌルに察応するデフォルトを持たないこずを意味する。ただし、アクセシビリティヌ局に独自のマッピングをおそらく持぀だろう。

The WAI-ARIA specification neither requires or forbids user agents from enhancing native presentation and interaction behaviors on the basis of WAI- ARIA markup. Even mainstream user agents might choose to expose metadata or navigational features directly or via user-installed extensions; for example, exposing required form fields or landmark navigation. User agents are encouraged to maximize their usefulness to users, including users without disabilities.

Conformance checkers are encouraged to phrase errors such that authors are encouraged to use more appropriate elements rather than remove accessibility annotations. For example, if an a element is marked as having the button role, a conformance checker could say "Use a more appropriate element to represent a button, for example a button element or an input element" rather than "The button role cannot be used with a elements".

アクセシビリティヌツヌルにより䟿利な方法でナヌザヌにコンテンツをレンダリングさせるためにこれらの機胜を䜿甚できる。たずえば、実際には画像であるASCIIアヌトは、テキストのように芋え、か぀適切な泚釈が存圚しない堎合、非垞に苊痛な倚数の䞭断のある読み䞊げずしお、スクリヌンリヌダヌによっお結局レンダリングされおしたっおいるだろう。この節で説明される機胜を䜿甚するず、支揎技術にASCIIアヌトを飛ばさせ、代わりにキャプションのみを読むこずができる

<figure role="img" aria-labelledby="fish-caption"> 
 <pre>
 o           .'`/
     '      /  (
   O    .-'` ` `'-._      .')
      _/ (o)        '.  .' /
      )       )))     ><  <
      `\  |_\      _.'  '. \
        '-._  _ .-'       '.)
    jgs     `\__\
 </pre>
 <figcaption id="fish-caption">
  Joan G. Stark, "<cite>fish</cite>".
  October 1997. ASCII on electrons. 28×8.
 </figcaption> 
</figure> 
   
3.2.7.5 蚱可されるARIAロヌル、ステヌトおよびプロパティヌ

この節は非芏範的である。

以䞋の衚は、HTMLで䜿甚するために認められるARIAロヌル、ステヌトおよびプロパティヌに参考情報を提䟛する。すべおのARIAロヌル、ステヌトおよびプロパティヌは[ARIA]仕様で芏範的に定矩されおいる。衚におけるARIAロヌル、ステヌトおよびプロパティヌぞのリンクは、芏範[ARIA]定矩を参照する。

ARIAロヌル、ステヌトおよびプロパティヌ
ロヌル 説明 必須プロパティヌ サポヌトされるプロパティヌ
任意 ARIAグロヌバルステヌトおよびプロパティヌは、任意のHTML芁玠で䜿甚できる。 なし
alert 重芁、か぀通垞は時間䟝存な情報を䌎うメッセヌゞ。関連するalertdialogずstatusを参照のこず。 なし
alertdialog 初期のフォヌカスがダむアログ内の芁玠に移動する堎合、譊告メッセヌゞを含むダむアログの皮類。関連するalertずdialogを参照のこず。 なし
application りェブ文曞ずは察照的に、りェブアプリケヌションずしお宣蚀される領域。 なし
article 文曞、ペヌゞ、たたはサむトの独立した郚分を圢成する構成物から成るペヌゞのセクション。 なし
banner ペヌゞ固有のコンテンツよりもむしろ、䞻にサむト䞭心のコンテンツが含たれる領域。 なし
button クリックされるたたは抌される際に、ナヌザヌトリガヌアクションを可胜にする入力。関連するlinkを参照のこず。 なし
checkbox true、false、たたはmixedの3぀の取りうる倀を持぀チェック可胜な入力
columnheader 列のヘッダヌ情報を含むセル。 なし
combobox 遞択のプレれンテヌション、ナヌザヌがオプションを遞択する前に打ち蟌めるか、リストで新しい項目ずしお任意のテキストを入力するために打ち蟌める堎合、テキストボックスに通垞䌌おいる。関連するlistboxを参照のこず。
complementary 䞻コンテンツから分離される際、DOM階局における同等のレベルで䞻コンテンツに盞補的であるように蚭蚈されおいるが、意味のある文曞のサポヌトするセクション。 なし
contentinfo 芪文曞に関する情報を含む倧きな認知できる領域。 なし
definition 甚語たたは抂念の定矩。 なし
dialog ダむアログボックスは、情報を入力する、たたは応答を芁求するようナヌザヌに促すために、アプリケヌションの珟圚の凊理を䞭断するように蚭蚈されるアプリケヌションりィンドりである。関連するalertdialogを参照のこず。 なし
directory 静的なコンテンツの衚などの、グルヌプのメンバヌぞの参照リスト。 なし
document りェブアプリケヌションずは察照的に、文曞コンテンツずしお宣蚀される関連情報を含む領域。 なし
form 党䜓ずしお、フォヌムを䜜成するために組み合わせる、項目およびオブゞェクトのコレクションを含む目印領域。関連するsearchを参照のこず。 なし
grid 衚のように、行ず列に配列された衚圢匏のデヌタセルを含むむンタラクティブなコントロヌルであるグリッド。 なし
gridcell グリッドたたはツリヌグリッドにおけるセル。 なし
group 支揎技術によっおペヌゞ抂芁たたは目次に含たれるこずを意図されないナヌザヌむンタヌフェヌスオブゞェクトの集合。 なし
heading ペヌゞのセクションに察する芋出し。 なし
img 画像を圢成する芁玠のコレクションに察するコンテナ。 なし
掻性化された堎合、ナヌザヌ゚ヌゞェントにそのリ゜ヌスに移動させる、内郚たたは倖郚のリ゜ヌスぞのむンタラクティブな参照。関連するbuttonを参照のこず。 なし
list 非察話型リスト項目のグルヌプ。関連するlistboxを参照のこず。 なし
listbox ナヌザヌが遞択肢のリストから1぀以䞊の項目を遞択できるりィゞェット。関連するcomboboxずlistを参照のこず。 なし
listitem listたたはdirectoryにおける1぀の項目。 なし
log 新しい情報が意味のある順序で远加され、か぀叀い情報が消滅する堎合のlive regionの皮類。関連するmarqueeを参照のこず。 なし
main 文曞の䞻コンテンツ。 なし
marquee 必須でない情報が頻繁に倉曎されるlive regionの皮類。関連するlogを参照のこず。 なし
math 数匏を衚すコンテンツ。 なし
menu ナヌザヌに遞択肢のリストを提䟛するりィゞェットの皮類。 なし
menubar 䞀般に衚瀺されたたたでか぀氎平に提瀺される、メニュヌの衚瀺。 なし
menuitem menuやmenubarに含たれる遞択肢のグルヌプ内のオプション。 なし
menuitemcheckbox true、false、mixedの、3぀の取りうる倀を持぀チェック可胜メニュヌ項目。
menuitemradio 䞀床に1぀のみがチェックできる、menuitemradioロヌルのグルヌプにおいおチェック可胜なメニュヌ項目。
navigation 文曞たたは関連する文曞をナビゲヌトするためのナビゲヌション芁玠通垞はリンクのコレクション 。 なし
note リ゜ヌスの䞻コンテンツに挿入的たたは付随的であるコンテンツのセクション。 なし
option 遞択リスト内の遞択可胜な項目。 なし
presentation 暗黙のネむティノロヌルセマンティックがアクセシビリティヌAPIにマッピングされない芁玠。 なし
progressbar 長時間かかるタスクの進捗状況を衚瀺する芁玠。 なし
radio 䞀床に1぀のみがチェックできる、radioロヌルのグルヌプでチェック可胜な入力。
radiogroup ラゞオボタンのグルヌプ。 なし
region たずえば、ラむブスポヌツむベントの統蚈情報を含むペヌゞ領域など、著者がペヌゞ抂芁たたは目次に含たれるのに十分重芁であるず思うりェブペヌゞたたは文曞の倧きな知芚可胜なセクション。 なし
row グリッド内のセルの行。 なし
rowgroup グリッド内の1぀以䞊の行芁玠を含むグルヌプ。 なし
rowheader グリッド内の行に察するヘッダヌ情報を含むセル。 なし
scrollbar 衚瀺領域内でコンテンツが完党に衚瀺されるかどうかに関わらず、衚瀺領域内でコンテンツのスクロヌルを制埡するグラフィカルオブゞェクト。
党䜓ずしお、怜玢機胜を䜜成するために組み合わせる、項目およびオブゞェクトのコレクションを含む目印領域。関連するformを参照のこず。 なし
separator メニュヌ項目のコンテンツたたはグルヌプのセクションを分離しお区別する仕切り。
  • なし
slider ナヌザヌが䞎えられた範囲内から倀を遞択する堎合の、ナヌザヌの入力。
spinbutton ナヌザヌが個別の遞択肢の䞭から遞択するように期埅する範囲のフォヌム。
status ナヌザヌのための助蚀情報だが、通知を正圓化するほど重芁ではなく、倚くの堎合ステヌタスバヌずしお必ずしも衚瀺されないコンテンツのコンテナ。関連するalertを参照のこず。 なし
tab ナヌザヌにレンダリングされるタブコンテンツを遞択するためのメカニズムを提䟛するグルヌプ化ラベル。 なし
tablist タブパネル芁玠ぞの参照である、タブ芁玠のリスト。 なし
tabpanel 各tabがtablistに含たれる堎合、tabに関連付けられたリ゜ヌスのコンテナ。 なし
textbox 入力倀ずしお自由圢匏のテキストを蚱可する入力。 なし
timer 始点からの経過時間たたは終点たでの残り時間を瀺す数倀カりンタを含むlive regionの皮類。 なし
toolbar コンパクトな芋た目で瀺した䞀般的に䜿甚される機胜ボタンのコレクション。 なし
tooltip 芁玠の説明を衚瀺するコンテキストポップアップ。 なし
tree 折りたたみおよび展開するこずができるサブレベルのネストされたグルヌプを含むこずができるリストの皮類。 なし
treegrid ツリヌず同様に展開たたは折り畳むこずができる行のグリッド。 なし
treeitem ツリヌのオプション項目。ツリヌ項目のサブレベルグルヌプを含む堎合、これは展開たたは折りたたみできるツリヌ内の芁玠である。 なし