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æååã§ãããªããŒãäžæžããããã¡ãæã€ã
ãŠãŒã¶ãŒãšãŒãžã§ã³ããäžæžãããããªããŒããå®è¡ããããšã«ãªã£ãŠããå ŽåããœãŒã¹ãã©ãŠãžã³ã°ã³ã³ããã¹ããäžãããã以äžã®ããã«æ¯ãèããªããã°ãªããªãïŒ
sourceããã©ãŠãžã³ã°ã³ã³ããã¹ãã®ã¢ã¯ãã£ãææžããã€ãªããŒãäžæžããããã¡ã®å€ã«ããã
addressããã©ãŠãžã³ã°ã³ã³ããã¹ãã®ã¢ã¯ãã£ãææžã®ã¢ãã¬ã¹ã«ããã
Navigate 眮ææå¹ãã€äŸå€æå¹ãšãšãã«ããã©ãŠãžã³ã°ã³ã³ããã¹ãã«ãœãŒã¹ãsourceã§ãããªãœãŒã¹ããœãŒã¹ãã©ãŠãžã³ã°ã³ã³ããã¹ãã¯äžæžããªããŒãã¢ã«ãŽãªãºã ã«äžãããããã®ã§ãããæäœã¢ã«ãŽãªãºã ããã®ç®çã®ããã«Documentãªããžã§ã¯ããäœæããå ŽåãDocumentã®ãªããŒãäžæžããã©ã°ãèšå®ãããªããŒãäžæžããããã¡ãsourceã«èšå®ããã
ããã²ãŒã·ã§ã³ã¢ã«ãŽãªãºã ã§ææžã®ã¢ãã¬ã¹ãèšå®ããæéãæ¥ããšãäžæžãURLãšããŠaddressã䜿çšããã
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;
referrerãŠãŒã¶ãŒãæäœããææžã®ã¢ãã¬ã¹ãè¿ãããã ããããã¯ããããããã¯ãã®ãããªææžããªãå Žåãé€ãããã®å Žå空æååãè¿ãã
noreferrerãªã³ã¯åã¯ãªãã¡ã©ã鮿ããããã«äœ¿çšããããã
The referrer attribute must return
the document's referrer.
HTTPã®å ŽåãreferrerIDL屿§ã¯ãã«ã¬ã³ãããŒãžãååŸãããšãã«éãããRefererããããŒã«ãããããã ããã
å
žåçãªãŠãŒã¶ãŒãšãŒãžã§ã³ãã¯ããªãã¡ã©ãæå·åããããããã³ã«ã䜿çšããã«ã¬ã³ãããŒãžãæå·åãããŠããªãå ŽæïŒããšãã°https:ããŒãžããhttp:ããŒãžã«æäœãããšãïŒã®å Žåããªãã¡ã©ãå ±åããªãèšå®ãããã
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:
Document that has no browsing context.Document whose address does not
use a server-based naming authority.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]
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.
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:
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.
readyStateDocumentãããã£ããè§£æãå®äºããããŸã ãµããªãœãŒã¹ãèªã¿èŸŒãã§ããæç¹ã§"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.
ã«ãŒãèŠçŽ ãååšãhtmlèŠçŽ ã§ããå Žåãææžã®htmlèŠçŽ ã¯ææžã®ã«ãŒãèŠçŽ ã§ãããããã§ãªããã°nullã§ããã
headheadèŠçŽ ãè¿ãã
ååšãããªãã°ãææžã®headèŠçŽ ã¯ãhtmlèŠçŽ ã®åã§ããæåã®headèŠçŽ ã§ãããããã§ãªããã°nullã§ããã
The head
attribute, on getting, must return the head
element of the document (a head element or
null).
title [ = value ]titleèŠçŽ ã«äžãããããã®ãšããŠãææžã®ã¿ã€ãã«ãè¿ãã
ææžã®ã¿ã€ãã«ãæŽæ°ããèšå®ãå¯èœã§ãããheadèŠçŽ ãååšããªãå Žåãæ°èŠã®å€ã¯ç¡èŠãããã
SVGææžã§ã¯ãSVGDocumentã€ã³ã¿ãŒãã§ãŒã¹ã®title屿§ãåªäœãšãªãã
ååšãããªãã°ãææžã®titleèŠçŽ ã¯ææžã§ã®ïŒããªãŒé ã§ïŒæåã®titleèŠçŽ ã§ãããããã§ãªããã°nullã§ããã
The title attribute must,
on getting, run the following algorithm:
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]
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.
Strip and collapse whitespace in value.
Return value.
On setting, the following algorithm must be run. Mutation events must be fired as appropriate.
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]
title element is null and
the head element is null, then the
attribute must do nothing. Stop the algorithm here.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.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]
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:
body or frameset element, then throw a
HierarchyRequestError exception and abort these steps.replaceChild() method had
been called with the new value and the incumbent body
element as its two arguments respectively, then abort these steps.HierarchyRequestError exception
and abort these steps.imagesDocumentã§imgèŠçŽ ã®HTMLCollectionãè¿ãã
embedspluginsDocumentã§embedèŠçŽ ã®HTMLCollectionãè¿ãã
linkshref屿§ãæã€Documentã§aããã³areaèŠçŽ ã®HTMLCollectionãè¿ãã
formsDocumentã§formèŠçŽ ã®HTMLCollectionãè¿ãã
scriptsDocumentã§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.
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:
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.
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.
Otherwise, if elements has only one element, return that element and abort these steps.
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:
applet, exposed embed, form,
iframe, img, or exposed object elements that
have a name content attribute whose value is name, orapplet or exposed object elements that have an id content attribute whose value is name, orimg elements that have an id content attribute
whose value is name, and that have a non-empty name
content attribute present also.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ã³ã³ãã³ã屿§ãšåæ§ã«å®çŸ©ãããã
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"屿§ãã¹ã¯ãªããã«ãã£ãŠåçã«æŽæ°ãããå ŽåããŠãŒã¶ãŒãšãŒãžã§ã³ãã¯é²è¡ç¶æ³ã®å€æŽã衚瀺ããããã«ã¬ã³ããªã³ã°ãæŽæ°ããã ããã
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).
ãã®ä»æ§ã«ãããŠåèŠçŽ ã¯ä»¥äžã®æ å ±ãå«ãå®çŸ©ãæã€ïŒ
èŠçŽ ãå±ããã«ããŽãªã®ãªã¹ããããã¯ãåèŠçŽ ã«å¯Ÿããã³ã³ãã³ãã¢ãã«ãå®çŸ©ããéã«äœ¿çšãããã
èŠçŽ ã䜿çšã§ããå Žæã®éèŠç¯çãªèšè¿°ããã®æ å ±ã¯ãåãšããŠããã®èŠçŽ ãèš±å¯ããèŠçŽ ã®ã³ã³ãã³ãã¢ãã«ãšãšãã«åé·ã§ãããå©äŸ¿æ§ã®ããã ãã«æäŸãããã
ç°¡åã®ããã«ãæãå ·äœçãªæåŸ ã®ã¿ãèšèŒããããããšãã°ãèŠçŽ ã¯ãããŒã³ã³ãã³ããŸãã¯ãã¬ãŒãžã³ã°ã³ã³ãã³ãã®ãããããäºæãããå Žæãªãã©ãã§ãããããŒã³ã³ãã³ããšãã¬ãŒãžã³ã°ã³ã³ãã³ãã®äž¡æ¹ã䜿çšã§ãããããããŒã³ã³ãã³ãã¯äºæãããå Žæãªãã©ãã§ãããã¬ãŒãžã³ã°ã³ã³ãã³ãããŸãäºæãããã®ã§ïŒãã¹ãŠã®ãã¬ãŒãžã³ã°ã³ã³ãã³ãã¯ãããŒã³ã³ãã³ãã§ããã®ã§ïŒããã "ãã¬ãŒãžã³ã°ã³ã³ãã³ããäºæãããå Žæ"ãšã ãèšèŒãããã ããã
ã³ã³ãã³ãããã®èŠçŽ ã®åãåå«ãšããŠå«ããªããã°ãªããªããã®ã®ãèŠç¯çãªèšè¿°ã
text/htmlæ§æã§ãéå§ã¿ã°ãšçµäºã¿ã°ãçç¥ããããšãã§ãããã©ããã®éèŠç¯çãªèšè¿°ããã®æ
å ±ã¯ãä»»æã¿ã°ã®ã»ã¯ã·ã§ã³ã§äžããããèŠç¯çèŠä»¶ãšãšãã«åé·ã§ãããå©äŸ¿æ§ã®ã¿ã®èŠçŽ ã®å®çŸ©ã«èšèŒãããã
ïŒèš±å¯ããªãå Žåãé€ãïŒèŠçŽ ã§æå®ãããŠããã屿§ã®èŠç¯çãªãªã¹ããããã³ããã屿§ã®éèŠç¯çãªèª¬æãïŒããã·ã¥ã®å·ŠåŽã®ã³ã³ãã³ããèŠç¯çã§ãããããã·ã¥ã®å³åŽã®ã³ã³ãã³ããããã§ãªããïŒ
ãã®ãããªèŠçŽ ãå®è£ ããªããã°ãªããªã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. æã«äŸãå«ãŸããã
ç¹ã«æå®ãããå Žåãé€ããHTMLèŠçŽ ã®å±æ§ã¯ãç©ºã®æååãå«ããä»»æã®æååå€ãæã£ãŠããããæç€ºçã«èšèŒãããå Žåãé€ããããã¹ãã屿§ãšããŠæå®ã§ãããã®ã«å¶éã¯ãªãã
ãã®ä»æ§ã§å®çŸ©ãããåèŠçŽ ã¯ãèŠçŽ ã®æåŸ
ãããã³ã³ãã³ãã®èª¬æãšãªããã³ã³ãã³ãã¢ãã«ãæã€ã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'),
};
HTMLã«ãããŠåèŠçŽ ã¯ã0å以äžã®ãé¡äŒŒã®ç¹æ§ãæã€ã°ã«ãŒãèŠçŽ ã§ããã«ããŽãªã«åé¡ããããæ¬¡ã®å€§ãŸããªã«ããŽãªããã®ä»æ§ã§äœ¿çšãããŠããïŒ
äžéšã®èŠçŽ ã¯ãŸããæ¬ä»æ§ã®ä»ã®éšåã§å®çŸ©ãããä»ã®ã«ããŽãªã«åé¡ãããã
ãããã®ã«ããŽãªã¯ã次ã®ããã«é¢é£ããïŒ
ã»ã¯ã·ã§ãã³ã°ã³ã³ãã³ããããã£ã³ã°ã³ã³ãã³ãããã¬ãŒãžã³ã°ã³ã³ãã³ãããšã³ããã£ããã³ã³ãã³ããããã³ã€ã³ã¿ã©ã¯ãã£ãã³ã³ãã³ãã¯ãã¹ãŠãããŒã³ã³ãã³ãåã§ãããã¡ã¿ããŒã¿ã¯ãæã«ãããŒã³ã³ãã³ããšãªããã¡ã¿ããŒã¿ãšã€ã³ã¿ã©ã¯ãã£ãã³ã³ãã³ãã¯æã«ãã¬ãŒãžã³ã°ã³ã³ãã³ããšãªãããšã³ããã£ããã³ã³ãã³ãã¯ãŸãããã¬ãŒãžã³ã°ã³ã³ãã³ãåã§ãããæã«ã€ã³ã¿ã©ã¯ãã£ãã³ã³ãã³ããšãªãã
ãã®ä»ã®ã«ããŽãªã¯ãŸããç¹å®ã®ç®çã®ããã«äœ¿çšããããããšãã°ãã©ãŒã ã³ã³ãããŒã«ã¯ãäžè¬çãªèŠä»¶ãå®çŸ©ããããã«å€æ°ã®ã«ããŽãªãçšããŠæå®ããããäžéšã®èŠçŽ ã¯åºæã®èŠä»¶ããããç¹å®ã®ã«ããŽãªã«å±ããªãã
ã¡ã¿ããŒã¿ã³ã³ãã³ãã¯ãèŠæ ããŸãã¯åŸã®ã³ã³ãã³ãã®æ¯ãèããèšå®ããããŸãã¯ä»ã®ææžãšã®é¢ä¿ãèšå®ããããŸãã¯ä»ã®"垯åå€ã®"æ å ±ã鿬ããã³ã³ãã³ãã§ããã
ã»ãã³ãã£ãã¯ãäž»ãšããŠã¡ã¿ããŒã¿ã«é¢é£ããä»ã®åå空éç±æ¥ã®èŠçŽ ïŒããšãã°ã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ã·ãªã¢ã©ã€ãŒãŒã·ã§ã³ã§ã¯äžå¯èœã§ããã
ææžããã³ã¢ããªã±ãŒã·ã§ã³ã®bodyã§äœ¿çšãããå€ãã®èŠçŽ ã¯ããããŒã³ã³ãã³ããšããŠåé¡ãããã
aabbraddressareaïŒmapèŠçŽ ã®åå«ã®å ŽåïŒarticleasideaudiobbdibdoblockquotebrbuttoncanvascitecodedatadatalistdeldfndivdlemembedfieldsetfigurefooterformh1h2h3h4h5h6headerhriiframeimginputinskbdkeygenlabelmainmapmarkmathmeternavnoscriptobjectoloutputppreprogressqrubyssampscriptsectionselectsmallspanstrongsubsupsvgtabletemplatetextareatimeuulvarvideowbrã»ã¯ã·ã§ãã³ã°ã³ã³ãã³ãã¯ãèŠåºãããã³ããã¿ãŒã®ç¯å²ãå®çŸ©ããã³ã³ãã³ãã§ããã
åã»ã¯ã·ã§ãã³ã°ã³ã³ãã³ãèŠçŽ ã¯æœåšçã«èŠåºããšã¢ãŠãã©ã€ã³ãæã€ã詳现ã¯èŠåºããšã»ã¯ã·ã§ã³ã®ç« ãåç §ã®ããšã
ããèŠçŽ ã¯ãŸãã»ã¯ã·ã§ãã³ã°ã«ãŒãã§ãããã»ã¯ã·ã§ãã³ã°ã³ã³ãã³ããšã¯ç°ãªãååšã ããã¢ãŠãã©ã€ã³ãæã€ã
ããã£ã³ã°ã³ã³ãã³ãã¯ã»ã¯ã·ã§ã³ã®ããããŒãå®çŸ©ããïŒæç€ºçã«ã»ã¯ã·ã§ãã³ã°ã³ã³ãã³ãèŠçŽ ãçšããŠããŒã¯ã¢ãããããããšãªããããšããŸãã¯ããã£ã³ã°ã³ã³ãã³ãèªäœã«ãã£ãŠæé»ã§ããããšãªããããšïŒã
ãã¬ãŒãžã³ã°ã³ã³ãã³ãã¯ãææžã®ããã¹ãããã³æ®µèœå ã¬ãã«ã§ãã®ããã¹ããããŒã¯ã¢ããããèŠçŽ ã§ãããæ®µèœãããã¬ãŒãžã³ã°ã³ã³ãã³ããç¶ãã
aabbrareaïŒmapèŠçŽ ã®åå«ã®å ŽåïŒaudiobbdibdobrbuttoncanvascitecodedatadatalistdeldfnemembediiframeimginputinskbdkeygenlabelmapmarkmathmeternoscriptobjectoutputprogressqrubyssampscriptselectsmallspanstrongsubsupsvgtemplatetextareatimeuvarvideowbrãã¬ãŒãžã³ã°ã³ã³ãã³ããšããŠåé¡ãããã»ãšãã©ã®èŠçŽ ã¯ãèªèº«ããããŒã³ã³ãã³ãã§ã¯ãªãããã¬ãŒãžã³ã°ã³ã³ãã³ããšããŠåé¡ãããèŠçŽ ã®ã¿ãå«ãããšãã§ããã
ã³ã³ãã³ãã¢ãã«ã®ã³ã³ããã¹ãã«ãããŠããã¹ãã¯ãäœããªãããTextããŒãã®ãããããæå³ãããããã¹ãã¯æã«ããã®ãŸãŸã§ã³ã³ãã³ãã¢ãã«ãšããŠäœ¿çšããããããã¬ãŒãžã³ã°ã³ã³ãã³ãã§ããããèŠçŽ éã®ç©ºçœæåã§ããããããããªãïŒTextããŒãã空ã§ããããåã«ç©ºçœæåãå«ãå ŽåïŒã
TextããŒãããã³å±æ§å€ã¯ãUnicodeæåããæ§æãããªããã°ãªãããU+0000æåãå«ãã§ã¯ãªãããæä¹
çã«æªå®çŸ©ã®UnicodeæåïŒnoncharactersïŒãå«ãã§ã¯ãªãããç©ºçœæå以å€ã®å¶åŸ¡æåãå«ãã§ã¯ãªããªãã
ãã®ä»æ§ã¯ãæç¢ºãªæèã«å¿ããTextããŒãããã³å±æ§å€ã®æ£ç¢ºãªå€ã«è¿œå ã®å¶éãå«ãã
ãšã³ããã£ããã³ã³ãã³ãã¯ãä»ã®ãªãœãŒã¹ããææžã«åã蟌ãã³ã³ãã³ãã§ããããææžãžæ¿å ¥ãããä»ã®èªåœç±æ¥ã®ã³ã³ãã³ãã§ããã
HTMLåå空é以å€ã®åå空éã«åºã¥ããã¡ã¿ããŒã¿ã§ãªãã³ã³ãã³ããäŒããèŠçŽ ã¯ããã®ä»æ§ã§å®çŸ©ãããã³ã³ãã³ãã¢ãã«ã®ç®çã®ããã®ãšã³ããã£ããã³ã³ãã³ãã§ãããïŒããšãã°ãMathMLããŸãã¯SVGãïŒ
äžéšã®ãšã³ããã£ããã³ã³ãã³ãèŠçŽ ã¯ããã©ãŒã«ããã¯ã³ã³ãã³ããæã€ããšãã§ãããããã¯å€éšãªãœãŒã¹ã䜿çšã§ããªãå ŽåïŒããšãã°ããµããŒããããŠããªããã©ãŒãããã§ããããïŒã«äœ¿çšãããã³ã³ãã³ãã§ãããããããã°ãèŠçŽ ã®å®çŸ©ã¯ã©ã®ãããªãã©ãŒã«ããã¯ã§ããããèšèŒããã
ã€ã³ã¿ã©ã¯ãã£ãã³ã³ãã³ãã¯ãç¹ã«ãŠãŒã¶ãŒãšã®äº€æµãæå³ããã³ã³ãã³ãã§ããã
aaudioïŒcontrols屿§ãååšããå ŽåïŒbuttonembediframeimgïŒusemap屿§ãååšããå ŽåïŒinputïŒtype屿§ãHiddenç¶æ
ã§ãªãå ŽåïŒkeygenlabelobjectïŒusemap屿§ãååšããå ŽåïŒselecttextareavideoïŒcontrols屿§ãååšããå ŽåïŒ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:
If the element's click in progress flag is set to true, then abort these steps.
Set the click in progress flag on the element to true.
Run pre-click activation steps on the element.
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.
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.
Set the click in progress flag on the element to false.
When a pointing device is clicked, the user agent must run these steps:
If the element's click in progress flag is set to true, then abort these steps.
Set the click in progress flag on the element to true.
Let e be the nearest activatable element of the element designated by the user (defined below), if any.
If there is an element e, run pre-click activation steps on it.
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.
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:
If target has a defined activation behavior, then return target and abort these steps.
If target has a parent element, then set target to that parent element and return to the first step.
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.
äžè¬çãªèŠåãšããŠãã³ã³ãã³ãã¢ãã«ãä»»æã®ãããŒã³ã³ãã³ããŸãã¯ãã¬ãŒãžã³ã°ã³ã³ãã³ããèš±å¯ããèŠçŽ ã¯ããã«ããã«ã³ã³ãã³ãã§ããããã€hidden屿§ãæå®ãããªããã®ã³ã³ãã³ãã§å°ãªããšã1ã€ããŒããæã€ã¹ãã§ããã
ããããèŠçŽ ãåæ³çã«ç©ºã«ã§ããå€ãã®ã±ãŒã¹ãããããã«ãããšãã°ãã¹ã¯ãªããã«ãã£ãŠåŸã§åãããããã¬ãŒã¹ãã«ããŒãšããŠäœ¿çšãããå ŽåããŸãã¯èŠçŽ ããã³ãã¬ãŒãã®äžéšã§ããããã€ã»ãšãã©ã®ããŒãžã§æºããããããäžéšã®ããŒãžã§é¢ä¿ããªãå Žåããã®èŠä»¶ã¯å³ããèŠä»¶ã§ã¯ãªãã
é©åæ§æ€æ»ã¯ããªãŒãµãªã³ã°ã®æŽå©ãšããŠããã®èŠä»¶ãæºãããªãèŠçŽ ãèŠã€ããããã®ã¡ã«ããºã ãå¶äœè ã«æäŸããããæšå¥šãããã
次ã®èŠçŽ ã¯ãã«ããã«ã³ã³ãã³ãã§ããïŒ
aabbraddressarticleasideaudioïŒcontrols屿§ãååšããå ŽåïŒbbdibdoblockquotebuttoncanvascitecodedatadfndivdlïŒèŠçŽ ã®åãå°ãªããšã1ã€ã®åå-å€ã°ã«ãŒããå«ãå ŽåïŒemembedfieldsetfigurefooterformh1h2h3h4h5h6headeriiframeimginputïŒtype屿§ãHiddenç¶æ
ã§ãªãå ŽåïŒinskbdkeygenlabelmainmapmarkmathmeternavobjectolïŒèŠçŽ ã®åãå°ãªããšã1ã€lièŠçŽ ãå«ãå ŽåïŒoutputppreprogressqrubyssampsectionselectsmallspanstrongsubsupsvgtabletextareatimeuulïŒèŠçŽ ã®åãå°ãªããšã1ã€lièŠçŽ ãå«ãå ŽåïŒvarvideoã¹ã¯ãªãããµããŒãèŠçŽ ã¯ãèªåèªèº«ã§äœã衚ããªãïŒã€ãŸããããã¯ã¬ã³ããªã³ã°ãããªãïŒããããšãã°ãŠãŒã¶ãŒã«æ©èœãæäŸããããã«ãã¹ã¯ãªããããµããŒãããããã«äœ¿çšãããã
次ã®èŠçŽ ã¯ãã¹ã¯ãªãããµããŒãèŠçŽ ã§ããïŒ
ããã€ãã®èŠçŽ ã¯ééçãšãããããã³ã³ãã³ãã¢ãã«ã®èª¬æã§ãããã®èŠçŽ ã¯"ééç"ãšããããééçãªèŠçŽ ã®ã³ã³ãã³ãã¢ãã«ã¯ããã®èŠªèŠçŽ ã®ã³ã³ãã³ãã¢ãã«ãåãç¶ãã"ééç"ã§ããã³ã³ãã³ãã¢ãã«ã®åœ¹å²ã§èŠæ±ãããèŠçŽ ã¯ãééçãªèŠçŽ ããããééçãªèŠªèŠçŽ ã®ã³ã³ãã³ãã¢ãã«ã®åœ¹å²ã§èŠæ±ããããã®ãšåãèŠçŽ ã§ããã
ããšãã°ã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"ã¯èš±å¯ãããã
ééçãªã³ã³ãã³ãã芪ãæããªãå Žåã"ééç"ã§ãããã®ã³ã³ãã³ãã¢ãã«ã®åœ¹å²ã¯ã代ããã«ä»»æã®ãããŒã³ã³ãã³ããåãå ¥ãããã®ãšããŠæ±ãããªããã°ãªããªãã
ãã®ç¯ã§å®çŸ©ããããããªçšèªæ®µèœã¯ã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ã€ã®æ®µèœãååšããïŒ
objectèŠçŽ ã§ãããæåã®æ®µèœã¯ä»ã®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>
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èŠçŽ ã«æå®ãããŠãããïŒ
onabortonblur*oncanceloncanplayoncanplaythroughonchangeonclickoncuechangeondblclickondurationchangeonemptiedonendedonerror*onfocus*oninputoninvalidonkeydownonkeypressonkeyuponload*onloadeddataonloadedmetadataonloadstartonmousedownonmouseenteronmouseleaveonmousemoveonmouseoutonmouseoveronmouseuponmousewheelonpauseonplayonplayingonprogressonratechangeonresetonresize*onscroll*onseekedonseekingonselectonshowonstalledonsubmitonsuspendontimeupdateontoggleonvolumechangeonwaitingãããèŠçŽ ãåãååããã€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屿§ãã·ãªã¢ã«åããæ¹æ³ã¯ååšããªãã
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.
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.
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.
Otherwise, if the element has a title attribute, then
return its value.
Otherwise, if the element has a parent element, then return the parent element's advisory information.
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.
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.
translate屿§translate屿§ã¯ãããŒãžãããŒã«ã©ã€ãºãããå Žåã«èŠçŽ ã®å±æ§å€ããã³ãã®TextããŒãã®åã®å€ã翻蚳ãããã©ããããŸãã¯å€æŽããã«ãã®ãŸãŸã«ãããã©ãããæå®ããããã«äœ¿çšãããåæå±æ§ã§ããã
屿§ã®ããŒã¯ãŒãã¯ã空æååãyesããã³noã§ããã空æååããã³yesããŒã¯ãŒãã¯yesç¶æ
ã«å¯Ÿå¿ãããnoããŒã¯ãŒãã¯noç¶æ
ã«å¯Ÿå¿ãããããã«ãinheritç¶æ
ãšãã第3ã®ç¶æ
ãååšãããããã¯æ¬ èœããå€ã®ããã©ã«ãïŒããã³åŠ¥åœã§ãªãå€ã®ããã©ã«ãïŒã§ããã
ïŒéHTMLèŠçŽ ã§ãããïŒåèŠçŽ ã¯ã翻蚳å¯èœç¶æ
ãŸãã¯ç¡ç¿»èš³ç¶æ
ã®ããããã®ç¿»èš³ã¢ãŒããæã€ãHTMLèŠçŽ ã®translate屿§ãyesç¶æ
ã§ããå Žåããã®èŠçŽ ã®ç¿»èš³ã¢ãŒãã¯ç¿»èš³å¯èœãªç¶æ
ãšãªããããã§ãªããã°ãèŠçŽ ã®translate屿§ãnoç¶æ
ã§ããå Žåããã®èŠçŽ ã®ç¿»èš³ã¢ãŒãã¯ç¡ç¿»èš³ç¶æ
ãšãªããããã§ãªããã°ãèŠçŽ ã®translate屿§ã¯inheritç¶æ
ãšãªããããŸãã¯èŠçŽ ãHTMLèŠçŽ ã§ãªããã®ããããã§ããããããã£ãŠtranslate屿§ãæããªãããããã«ãããããããã°èŠçŽ ã®ç¿»èš³ã¢ãŒããããã®èŠªèŠçŽ ãšåãç¶æ
ãšãªãããŸãã¯èŠçŽ ãã«ãŒãèŠçŽ ã§ããå Žåã翻蚳å¯èœç¶æ
ãšãªãã
èŠçŽ ã翻蚳å¯èœç¶æ
ã«ããå ŽåãèŠçŽ ã®ç¿»èš³å¯èœå±æ§ãšãã®TextããŒãã®åã®å€ã¯ãããŒãžãããŒã«ã©ã€ãºãããéã«ç¿»èš³ãããã翻蚳å¯èœå±æ§ãšããŠæããããªãèŠçŽ ã®å±æ§ã¯ã翻蚳ãããã¹ãã§ãªãã
èŠçŽ ãç¡ç¿»èš³ç¶æ
ã«ããå ŽåãïŒç¿»èš³å¯èœå±æ§å€ãå«ãïŒèŠçŽ ã®å±æ§å€ãšãã®TextããŒãã®åã®å€ã¯ãããšãã°èŠçŽ ã人ç©åãã³ã³ãã¥ãŒã¿ããã°ã©ã åãå«ããããããŒãžãããŒã«ã©ã€ãºããããšãã«ããã®ãŸãŸã§æ®ãããã
以äžã®å±æ§ã¯ç¿»èš³å¯èœå±æ§ã§ããïŒ
thèŠçŽ ã®abbrareaãimgãinputèŠçŽ ã®altname屿§ãå€ã«ç¿»èš³å¯èœãšããŠç¥ãããã¡ã¿ããŒã¿åãæå®ããå ŽåãmetaèŠçŽ ã®contentaããã³areaèŠçŽ ã®downloadoptgroupã optionãããã³trackèŠçŽ ã®labellangã翻蚳ã§äœ¿çšãããèšèªãšäžèŽãã"翻蚳ããã"ãã®ã§ãªããã°ãªããªããinputããã³textareaèŠçŽ ã®placeholderiframeèŠçŽ ã®srcdocãè§£æãããã€ååž°çã«åŠçãããªããã°ãªããªãstyleãè§£æãããã€ååž°çã«åŠçãããªããã°ãªããªãïŒããšãã°'content'ããããã£ãŒã®å€ïŒtitletype屿§ããã€inputèŠçŽ ã®valueThe 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>
xml:base屿§ïŒXMLã®ã¿ïŒxml:base屿§ã¯XML Baseãå®çŸ©ããã[XMLBASE]
xml:base屿§ãXMLææžã®HTMLèŠçŽ ã§äœ¿çšããŠããããèè
ã¯HTMLææžã§ã®HTMLèŠçŽ ã«ãããŠxml:base屿§ã䜿çšããŠã¯ãªããªãã
dir屿§dir屿§ã¯ãèŠçŽ ã®ããã¹ãæ¹åãæå®ããã屿§ã¯ã次ã®ããŒã¯ãŒããšç¶æ
ãæã€åæå±æ§ã§ããïŒ
ltrããŒã¯ãŒããltrç¶æ
ã«å¯Ÿå¿ãããèŠçŽ ã®ã³ã³ãã³ãã¯ãæç€ºçã«å€ç«ããå·Šããå³ãžã®ããã¹ãã§ããããšã瀺ãã
rtlããŒã¯ãŒããrtlç¶æ
ã«å¯Ÿå¿ãããèŠçŽ ã®ã³ã³ãã³ãã¯ãæç€ºçã«å€ç«ããå³ããå·Šãžã®ããã¹ãã§ããããšã瀺ãã
autoããŒã¯ãŒããautoç¶æ
ã«å¯Ÿå¿ãããèŠçŽ ã®ã³ã³ãã³ãã¯æç€ºçã«å€ç«ããããã¹ãã§ããããšã瀺ãããæ¹åã¯ãããã°ã©ã ã§ã®èŠçŽ ã®ã³ã³ãã³ããçšããŠïŒåŸè¿°ïŒæ±ºå®ãããã
ãã®ç¶æ ã§çšãããããã¥ãŒãªã¹ãã£ãã¯ã¯éåžžã«ç²éã§ããïŒåæ¹åã¢ã«ãŽãªãºã ã«ãããæ®µèœã¬ãã«ã®æ±ºå®ã«é¡äŒŒããæ¹æ³ã§ã匷ãæåæ§ããã€æåã®æåã®ã¿ãèŠãïŒãèè ã¯ãããã¹ãã®æ¹åãå šãæªç¥ã§ããå ŽåãæåŸã®ææ®µãšããŠã®ã¿ãã®å€ã䜿çšããããèŠè«ããåæ§ã®ãµãŒããŒåŽã®ãã¥ãŒãªã¹ãã£ãã¯ãé©çšã§ããã[BIDI]
textareaããã³preèŠçŽ ã«å¯ŸããŠããã¥ãŒãªã¹ãã£ãã¯ã¯æ®µèœã¬ãã«ããšã«é©çšãããã
屿§ã¯åŠ¥åœã§ãªãå€ã®ããã©ã«ãããã³æ¬ èœããå€ã®ããã©ã«ããæããªãã
ïŒHTMLèŠçŽ ã ãã§ãªããä»»æã®èŠçŽ ã§ïŒèŠçŽ ã®æ¹åã¯ã'ltr'ãŸãã¯'rtl'ã®ããããã§ãããæ¬¡ã®ãªã¹ãããæåã®é©åãªäžé£ã®ã¹ãããããšã«æ±ºå®ãããïŒ
dir屿§ãltrç¶æ
ã®å Žådir屿§ãç¶æ
ãå®çŸ©ãããªãå ŽåïŒããªãã¡ãååšããªãã劥åœã§ãªãå€ãæã€ïŒtype屿§ãTelephoneç¶æ
ã§ããinputèŠçŽ ã§ããããã€dir屿§ãç¶æ
ãå®çŸ©ãããªãå ŽåïŒããªãã¡ãååšããªãã劥åœã§ãªãå€ãæã€ïŒdir屿§ãrtlç¶æ
ã®å Žåtype屿§ãTextãSearchãTelephoneãURLãŸãã¯E-mailç¶æ
ã§ããinputèŠçŽ ã§ããã€dir屿§ãautoç¶æ
ã§ããèŠçŽ ã®å ŽåtextareaèŠçŽ ãã€dir屿§ãautoç¶æ
ã§ããèŠçŽ ã®å ŽåèŠçŽ ã®å€ã忹忧æåã®æååALãŸãã¯Rãå«ã¿ããã€èŠçŽ ã®å€ã®åã«åæ¹åæ§æåã®æååLãååšããªãå ŽåãèŠçŽ ã®æ¹åã¯'rtl'ãšãªãã[BIDI]
ããã§ãªããã°ãèŠçŽ ã®å€ã空æååã§ãªãå ŽåããŸãã¯èŠçŽ ãã«ãŒãèŠçŽ ã§ããå ŽåãèŠçŽ ã®æ¹åã¯'ltr'ã§ããã
ããã§ãªããã°ãèŠçŽ ã®æ¹åã¯ããã®èŠçŽ ã®èŠªèŠçŽ ã®æ¹åãšåãã§ããã
dir屿§ãautoç¶æ
ã®å ŽåbdièŠçŽ ã§ããããã€dir屿§ãç¶æ
ãå®çŸ©ãããªãå ŽåïŒããªãã¡ãååšããªãã劥åœã§ãªãå€ãæã€ïŒããªãŒé ã§æ¬¡ã®åºæºã«äžèŽããæåã®æåãèŠã€ããïŒ
æåãæ¹åãæ±ºå®ãããŠããèŠçŽ ã®åå«ã®TextããŒãç±æ¥ã§ããã
æåã忹忧æååLãALããŸãã¯Rãããªãã[BIDI]
æåãæ¹åãæ±ºå®ãããŠããèŠçŽ ã®ç¥å
ã®TextããŒãç±æ¥ã§ãªããæ¬¡ã®ããããïŒ
ãã®ãããªæåãèŠã€ãããããã®æåã忹忧æååALãŸãã¯Rã®å ŽåãèŠçŽ ã®æ¹åã¯'rtl'ã§ããã
ãã®ãããªæåãèŠã€ãããããã®æåã忹忧æååLã§ããå ŽåãèŠçŽ ã®æ¹åã¯'ltr'ã§ããã
ããã§ãªããã°ãèŠçŽ ã空ã§ãã€ã«ãŒãèŠçŽ ã§ãªãå ŽåãèŠçŽ ã®æ¹åã¯ããã®èŠçŽ ã®èŠªèŠçŽ ã®æ¹åãšåãã§ããã
dir屿§ãç¶æ
ãå®çŸ©ãããªãå ŽåïŒããªãã¡ãååšããªãã劥åœã§ãªãå€ãæã€ïŒèŠçŽ ã®æ¹åã¯ããã®èŠçŽ ã®èŠªèŠçŽ ã®æ¹åãšåãã§ããã
dir屿§ã¯HTMLèŠçŽ ã«å¯ŸããŠã®ã¿å®çŸ©ãããã®ã§ãä»ã®åå空éããã®èŠçŽ ã§ã¯ååšãåŸãªãããããã£ãŠãä»ã®åå空éç±æ¥ã®èŠçŽ ã¯åžžã«èŠªèŠçŽ ããã®ã¿æ¹åãç¶æ¿ãããã€ãŸããååšããªãå Žåãããã©ã«ãã¯'ltr'ãšãªãã
This attribute has rendering requirements involving the bidirectional algorithm.
屿§ã®æååãäœããã®æ¹æ³ã§ã¬ã³ããªã³ã°ã«å«ãŸããéã«äœ¿çšããããHTMLèŠçŽ ã®å±æ§ã®æ¹åã¯ãäžèšãªã¹ãããã¹ãããã®æåã®é©åãªã»ããã«åŸã£ãŠæ±ºå®ãããïŒ
dir屿§ãautoç¶æ
ã§ããå Žå忹忧æååLãALããŸãã¯Rã®ãã屿§å€ã®æåã®æåãïŒè«ççãªé åºã§ïŒèŠã€ããã[BIDI]
ãã®ãããªæåãèŠã€ãããããã®æåã忹忧æååALãŸãã¯Rã®å Žåã屿§ã®æ¹åã¯'rtl'ã§ããã
以äžã®å±æ§ã¯æ¹åå¯èœå±æ§ã§ããïŒ
thèŠçŽ ã®abbrareaãimgãinputèŠçŽ ã®altname屿§ãå€ã«äž»ã«æ©æ¢°å¯èªããããã人éå¯èªã§ããããšãæå³ãããã®ãæå®ããå ŽåãmetaèŠçŽ ã®contentoptgroupã optionãããã³trackèŠçŽ ã®labelinputããã³textareaèŠçŽ ã®placeholdertitledir [ = 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èŠçŽ ãžã®ããã©ã«ãã®é
眮ã¹ã¿ã€ã«ãäžãããããããªãã¡ããã¹ããæ®µèœã®éå§ç«¯ãžæããããšã§ãçµæãšããŠçããã¬ã³ããªã³ã°ã¯ä»¥äžã®ããã«ãªãïŒ

åè¿°ããããã«ãautoå€ã¯äžèœè¬ã§ã¯ãªãã"æ£ããïŒ"ã¢ã©ãã¢èªããã¹ãã®å·ŠåŽã«ãªãããšãèµ·ããã¢ã©ãã¢æåã§å§ãŸãã®ã§ããã®äŸã®æåŸã®æ®µèœã¯ãå³ããå·Šãžã®ããã¹ãã§ãããšèª€ã£ãŠè§£éãããã
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]
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屿§ãçšãããïŒ
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>
data-*屿§ããã€ã«ã¹ã¿ã éèŠèŠããŒã¿ã®åã蟌ã¿ã«ã¹ã¿ã ããŒã¿å±æ§ã¯ãæåå"data-"ã§å§ãŸãåå空éã®ãªãååããã€å±æ§ã§ããããã€ãã³ã®åŸã«å°ãªããšã1æåãæã¡ãXMLäºæã§ãããASCII倧æåãå«ãŸãªãã
ASCII倧æåã§ã®å¶çŽã¯ãã®ãããªææžã«åœ±é¿ããªãã®ã§ãHTMLææžã«ãããŠHTMLèŠçŽ ã®ãã¹ãŠã®å±æ§åã¯ASCIIå°æåãèªåçã«ååŸããã
ã«ã¹ã¿ã ããŒã¿å±æ§ã¯ãããŒãžãŸãã¯ã¢ããªã±ãŒã·ã§ã³ãžç§çãªã«ã¹ã¿ã ããŒã¿ãèšæ¶ããããšãæå³ããããã以äžé©åãªå±æ§ãèŠçŽ ã¯ååšããªãã
ãã®å±æ§ã¯ã屿§ã䜿çšãããµã€ãããç¬ç«ãããœãããŠã§ã¢ã«ãã䜿çšãæå³ããªãã
ããšãã°ã鳿¥œã«é¢ãããµã€ãã¯ãåãã©ãã¯ã®é·ããå«ãã«ã¹ã¿ã ããŒã¿å±æ§ã§ã¢ã«ãã å ã®ãã©ãã¯ã衚ããªã¹ãé ç®ã«æ³šéãä»ãããããããªãããã®åŸãã®æ å ±ã¯ããŠãŒã¶ãŒããã©ãã¯ã®é·ãã§ãªã¹ãããœãŒãã§ããããã«ããããããŸãã¯äžå®é·ãã®ãã©ãã¯ã®ãªã¹ãããã£ã«ã¿ãªã³ã°ããããã«ããµã€ãèªäœã䜿çšãããããããªãã
<ol> <li data-length="2m11s">Beyond The Sea</li> ... </ol>
ãããããã®ããŒã¿ãèŠãããšã§äžå®ã®é·ãã®æ²ãæ€çŽ¢ããããã«ããŠãŒã¶ãŒããã®é³æ¥œãµã€ãã«é¢é£ä»ããããŠããªãäžè¬çãªãœãããŠã§ã¢ã䜿çšããããšã¯ãäžé©åœã ããã
ããã¯ããã®å±æ§ããµã€ãã®ç¬èªã¹ã¯ãªããã«ãã䜿çšãæå³ããå ¬éã§å©çšå¯èœãªã¡ã¿ããŒã¿ã®ããã®äžè¬çãªæ¡åŒµã¡ã«ããºã ã§ãªãããã§ããã
åHTMLèŠçŽ ã¯ä»»æã®å€ãšãšãã«ãä»»æã®æ°ã®æå®ãããã«ã¹ã¿ã ããŒã¿å±æ§ãæã£ãŠãããã
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:
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.SyntaxError exception and abort these steps.data- at the front of name.setAttribute() would have thrown an exception when setting an attribute with
the name name, then this must throw the same exception.data- at the front of name.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ã®ãããªååãæã€ããã«ããïŒã
HTMLèŠçŽ ã®ã³ã³ãã³ãã§TextããŒãããã€HTMLèŠçŽ ã«ãããããã¹ãã³ã³ãã³ããããã³èªç±åœ¢åŒã®ããã¹ããèš±å¯ããHTMLèŠçŽ ã®å±æ§ã®ããã¹ãã¯ãU+202AããU+202EãŸã§ã®ç¯å²ïŒåæ¹åã¢ã«ãŽãªãºã ã®æžåŒèšå®æåïŒã®æåãå«ãã§ãããããã ãããããã®æåã®äœ¿çšã¯ããããã®æåã«ãã£ãŠçæãããä»»æã®åã蟌ã¿ãŸãã¯äžæžãããç°ãªã芪èŠçŽ ã§éå§ãŸãã¯çµäºã§ããªãããããã€ãã¹ãŠã®ãã®ãããªåããã¿ãšäžæžããæç€ºçã«U+202C POP DIRECTIONAL FORMATTINGæåã§çµããããã«å¶éããããããã¯ãåæ¹åã¢ã«ãŽãªãºã äžã®äºæããªã广ãæã€æ¹æ³ã§åå©çšãããããã¹ãã®çºçãæžå°ãããã®ã«åœ¹ç«ã€ã[BIDI]
äžèšã®å¶éã¯ãææžã®ç¹å®ã®éšåãåæ¹åã¢ã«ãŽãªãºã ã®æžåŒèšå®æåã®ç¯å²ã圢æããããšã®æå®ã«ãã£ãŠå®çŸ©ããããã®åŸãã®ãããªç¯å²ã§èŠæ±ã課ããŠããã
以äžã®ã¢ã«ãŽãªãºã ãHTMLèŠçŽ elementã«é©çšããçµæããããããæååã¯ãåæ¹åã¢ã«ãŽãªãºã ã®æžåŒèšå®æåã®ç¯å²ã§ããïŒ
outputãæååã®ç©ºãªã¹ãã«ããã
stringã空æååã«ããã
ããããã°ãnodeãelementã®æåã®åããŒãã«ãããããã§ãªããã°nullã«ããã
Loop: nodeãnullã®å Žåãendãšã©ãã«ä»ããããã¹ããããŸã§é£ã¶ã
次ã®ãªã¹ãããæåã«äžèŽããã¹ãããã«ãããã£ãŠnodeãå®è¡ããïŒ
TextããŒãã§ããå Žånodeã®ããã¹ãããŒã¿ã«stringãå ããã
brèŠçŽ ã§ããå Žåstringã空æååã§ãªãå Žåãstringãoutputã«æŒãã€ããstringã空æååã«ããã
ããããã°ãnodeãnodeã®æ¬¡ã®å åŒã«ãããããã§ãªããã°nullã«ããã
loopã«ã©ãã«ä»ããããã¹ãããã«ãžã£ã³ãããã
End: stringã空æååã§ãªãå Žåãstringãoutputã«æŒãã€ããã
åæ¹åã¢ã«ãŽãªãºã æžåŒèšå®æåãšããŠ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ãšäºãã«äžå®å
šã«åœ±é¿ãããã
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):
èè ã¯ããã®ç¯ã§æäŸããããã®ãè¶ ãã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.
ãã¹ãŠã®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.
ãã¹ãŠã®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ã»ãã³ãã£ãã¯ã®ç¯ã®èŠæ±ã«ãããã£ãŠåŠçãããã
次ã®è¡šã¯ã匷ããã€ãã£ãŽã»ãã³ãã£ãã¯ãã€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"ã«èšå®ãã
|
äžéšã®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ããŒã« æ³šïŒ | æå®ãããå ŽåãããŒã«ã¯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>