Contents
This section is informative. For the normative version, see [XHTML2].
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.
Example
cite="comments.html"
Actuation occurs as the default action of a [DOM] DOMActivate event for the element on which the attribute occurs (for instance as the result of the user clicking on the associated element). If elements contained within an element using an @href also use an @href attribute, the User Agent must provide a mechanism for actuating any of these "nested" URIs.
Example
<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>
This attribute specifies the primary language of the resource designated by @href. At its most general, it is a comma-separated list of language ranges with optional accept parameters, as defined in section 14.4 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.
Example
<p href="http://www.w3.org/2003/06/semantictour-pressrelease" hreflang="fr"> The press release in French </p>
Example
<p href="http://www.example.com/forPrinters.html" hrefmedia="print"> A printable version of this page. </p>
Example
<p href="http://www.w3.org" hreftype="text/html,application/xhtml+xml"> The W3C Home Page </p>
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, then no element receives focus.
Once a focusable element in the document has focus, upon requesting that focus change to the next focusable element, the user agent MUST follow these rules when determining where focus is next set:
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):
Example
<table> <tr><td id="a" href="nw" nextfocus="b">NW</td> <td id="c" href="ne" nextfocus="d">NE</td></tr> <tr><td id="b" href="sw" nextfocus="c">SW</td> <td id="d" href="se">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).
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.
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]. However, values of this attribute that begin with the character '_' are reserved.
Example
<a href="home.html" target="main">Home</a>
An element inherits URI base information according to the following order of precedence (highest to lowest):
Example
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>
When this module is selected, the Hypertext Attributes Collection is included in the Common attribute collection.
Implementations: RELAX NG, XML Schema
Fw: [XHTML 2] 13.1 Hypertext Attributes Module - nextfocus
PR #7792
State: Approved
Resolution: None
User: None
Notes:
It is up to the document author to ensure that anchors in a document are
appropriate for the document's audience. It would be inappropriate for a user
agent to second guess the author's intent by adjusting focus to some parent
element of the target.
With regard to form fields and incrementally loading user agents, the working
group feels that it is unlikely a document's fields should be active before the
document is done loading. Loading is complete when the DOMload event fires -
before that the user should not be able to interact with the document's content
- the content may not have been properly prepared / initialized until after
that.