Contents
This section is normative.
The Hypertext Attributes Module defines the Hypertext attribute collection. This collection allows an element to be the start point of a hypertext link to a remote resource.
Actuation occurs as the default action of a [DOM] DOMActivate event for the element that the attribute occurs on.
<abbr href="http://www.w3.org/" title="World Wide Web">WWW</abbr> <li href="contents.xhtml">contents</li> <a href="http://www.cwi.nl/~steven/amsterdam.html">Amsterdam</a> <quote href="hamlet.xhtml#p2435">To be or not to be</quote> <var href="#index_ninc">ninc</var>
In terms of [HLINK], the href attribute is specified as:
<hlink namespace="http://www.w3.org/2002/06/xhtml2" locator="href" effectValue="replace" replacement="target" role="rel" mediaType="hreftype" actuateValue="onRequest"/>
This attribute specifies the allowable content types of the relevant href URI. At its most general, it is a comma-separated list of media ranges with optional accept parameters, as defined in section 14.1 of [RFC2616] as the field value of the accept request header.
In its simplest case, this is just a media type, such as "image/png" or "application/xml", but it may also contain asterisks, such as "image/*" or "*/*", or lists of acceptable media types, such as "image/png, image/gif, image/jpeg".
The user agent must combine this list it with its own list of acceptable media types by taking the intersection, and then use the resulting list as the field value of the accept
request header when requesting the resource using HTTP.
For instance, if the attribute specifies the value "image/png, image/gif, image/jpeg", but the user agent does not accept images of type "image/gif" then the resultant accept header would contain "image/png, image/jpeg".
A user agent should imitate similar behavior when using other methods than HTTP. For instance, when accessing files in a local filestore, <p src="logo" type="image/png,
image/jpeg">
might cause the user agent first to look for a file logo.png
, and then for logo.jpg
.
If this attribute is not present, "*/*" is used for its value.
For the current list of registered content types, please consult [MIMETYPES].
<p href="http://www.w3.org" hreftype="text/html,application/xhtml+xml"> The W3C Home Page </p>
This attribute specifies the base language of the resource designated by href and may only be used when href is specified. At its most general, it is a comma-separated list of language ranges with optional accept parameters, as defined in section 14.5 of [RFC2616] as the field value of the Accept-Language request header.
In its simplest case, this is just a language code, such as "nl", but it may also contain variant specifications such as "en-gb".
The user agent must use this list as the field value of the accept-language
request header when requesting the resource using HTTP.
If this attribute is not present, the user agent must use its default value of the accept-language request header.
<p href="http://www.w3.org/2003/06/semantictour-pressrelease" hreflang="fr"> The press release in French </p>
cite="comments.html"
In terms of [HLINK], the cite attribute is specified as:
<hlink namespace="http://www.w3.org/2002/06/xhtml2" locator="cite" effectValue="new" actuateValue="onRequestSecondary"/>
This specification does not define how this attribute gets used, since that is defined by the environment that the hyperlink is actuated in. See for instance XFrames [XFRAMES].
<a href="home.html" target="main">Home</a>
Activating an access shortcut bound to an element gives focus to the element. The action that occurs when an element receives focus depends on the element. For example, when a user activates a link defined by the a element, the user agent generally follows the link. When a user activates a radio button, the user agent changes the value of the radio button. When the user activates a text field, it allows input, etc.
Access names do not have to be unique in a document. Activating a shortcut takes the user to the next element with the bound-to name.
In this example, we assign the access name "contents" to a link. Using the binding assigned to this location takes the user to another document, in this case, a table of contents.
<p access="contents" href="http://example.com/specification/contents.html"> Table of Contents </p>
The invocation of access shortcuts, and the assignment of key or other bindings to them is not further defined here. A user agent should allow the user to access the user agent's list of recognized access points, to add to them, and to specify bindings for them.
Access attribute needs list of standard access points
A list of access points (such as 'main content', 'navigation list', 'submit button' is in preparationThe elements in a document that can be "activated" are called "focusable" elements. The sequence of focusable elements is called the document's navigation order. The navigation order defines the order in which elements will receive focus when navigated by the user. The navigation order may include elements nested within other elements.
When a document is first loaded, a user agent must do the following:
book.html#chapter5
)
In the event no element in the document has focus, when the user requests the next focusable element, that element must be the next focusable element forward from the current navigation point in document order. If there are no focusable elements before the end of the document, focus shifts to the first focusable element in document order. If a document has no focusable elements, the behavior is unspecified.
Once a focusable element in the document has focus, upon requesting that focus change to the next focusable element, the user agent must do the following:
Regardless of the way in which an element receives focus, if the element is not currently visible on the user agent's display, the display must be updated so that the element is visible.
The following example would allow the links to be navigated in column order (without the use of nextfocus
they would be navigated in document, i.e. row, order):
<table> <tr><td id="a" nextfocus="b">NW</td> <td id="c" nextfocus="d">NE</td></tr> <tr><td id="b" nextfocus="c">SW</td> <td id="d">SE</td></tr> </table>
Navigation keys. The actual key sequence that causes navigation or element activation depends on the configuration of the user agent (e.g., the "tab" key might be used for navigation and the "enter" key or "space" key used to activate a selected element).
The elements in a document that can be "activated" are called "focusable" elements. The sequence of focusable elements is called the document's navigation order. The navigation order defines the order in which elements will receive focus when navigated by the user. The navigation order may include elements nested within other elements.
In the event no element in the document has focus, when the user requests the previous focusable element, that element must be the next focusable element backward from the current navigation point in document order. If there is no such focusable element back to the start of the document, focus shifts to the last focusable element in document order. If a document has no focusable elements, the behavior is unspecified.
Once a focusable element in the document has focus, upon requesting that focus change to the previous focusable element, the user agent must do the following:
Regardless of the way in which an element receives focus, for visual user agents, if the element is not currently visible on the user agent's display, the display must be updated so that the element is visible.
The following example would allow the links to be navigated in column order (without the use of nextfocus
and prevfocus
they would be navigated in document, i.e. row,
order):
<table> <tr> <td id="a" nextfocus="b" >NW</td> <td id="c" nextfocus="d" prevfocus="b">NE</td></tr> <tr> <td id="b" nextfocus="c" prevfocus="a">SW</td> <td id="d" prevfocus="c">SE</td></tr> </table>
Navigation keys. The actual key sequence that causes navigation depends on the configuration of the user agent (e.g., the "shift-tab" key might be used for navigation).
An element inherits URI base information according to the following order of precedence (highest to lowest):
See: <ul xml:base="http://www.w3.org"> <li href="/" src="Icons/w3c_home">The W3C home page</li> <li href="/TR">The W3C Technical Reports page</li> <li href="/Markup">The HTML home page</li> <li href="/Markup/Forms">The XForms home page</li> </ul>
Implementation: RELAX NG