15. XHTML Access Module


This section is normative.

This module defines the access element.

Element Attributes Content Model
access Common, key, targetid, targetrole EMPTY

Implementation: RELAX NG

15.1. The access element

The access element assigns an accessibility mapping to elements within a document. Actuating the shortcut results in the element gaining focus.


The Common collection
A collection of other attribute collections, including: Bi-directional, Core, Edit, Embedding, Events, Forms, Hypertext, I18N, Map, and Metainformation.
key = Character
This attribute assigns a key mapping to an access shortcut. An access key is a single character from the document character set. Note: Authors should consider the input method of the expected reader when specifying an accesskey.

Triggering an access key defined in an access element gives focus to the next element in navigation order from the current focus that has the referenced role or id value. Note that it is possible to associate additional event handlers with target which might then perform additional actions once focus is changed.

The invocation of access keys depends on the implementation. For instance, on some systems one may have to press the "alt" key in addition to the access key. On other systems, one generally has to press the "cmd" key in addition to the access key.

The rendering of access keys depends on the user agent. We recommend that authors include the access key in label text or wherever the access key is to apply. User agents should render the value of an access key in such a way as to emphasize its role and to distinguish it from other characters (e.g., by underlining it).

The Character assigned to a key, and its relationship to a role or id attribute, are a suggestion of the author. User agents may provide mechanisms for overriding, disabling, or re-assigning keys. In such user agents, user-specified assignments must take precendence.

targetid = IDREF
The targetid attribute specifies an IDREF of the target element for the associated event (i.e., the node to which the event should be delivered).
targetrole = CURIEs
The targetrole attribute specifies space separated list if QNames that maps to an element with a role attribute with the same value.

If no key attribute is specified, the user agent may assign an appropriate device mapping.

If a targetid and a targetrole are both specified for an element, the targetid attribute value must take precedence.

Access element that focuses into a field

<access key="s" 
        title="Social Security Number" 
        targetrole="ss:number" />

Accessing a table of contents

<access key="c"
        title="Table of Contents" 
        targetrole="toc" />

Access that moves to the main content

<access key="m"
        title="Main content" 
        targetrole="main" />

Access element that goes to a specific element

<access key="u" 
        targetid="username" />

Access element with no specific key mapping

<access title="Navigation bar" 
        targetrole="navigation" />