# 25. XHTML Role Access Module

Contents

This section is normative.

This module defines the Role attribute collection and the access element.

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

## 25.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.

Attributes

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.

  Pressing 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 value.

  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).

targetid = IDREF
  The optional targetid attribute specifies an IDREF of the target element for the associted event (i.e., the node to which the event should be delivered).

targetrole = QName
  The targetrole attribute specifies a QName that maps to an element with a role attribute with the same value.

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"
            title="Username"
            targetid="username" />

## 25.2. Role Collection

role = QName
  This attribute describes the relationship the current element (and its contents) has to the value of the about attribute or its default value. It is used by applications and assistive technologies to determine the purpose of UI widgets. In the case of a web page it may be declarative as a function of particular elements or it may be an attribute which is configurable by the page author. Additionally, role information may be used to define each action which may be performed on an element. This allows a user to make informed decisions on which actions may be taken on an element and activate the selected action in a device independent way.

  Example

      <nl role="wai:sitemap">
          <li href="downloads">Downloads</li>
          <li href="docs">Documentation</li>
          <li href="news">News</li>
      </nl>

  Additional roles may be defined through the use of this attribute. Roles shall be defined as qnames referencing RDF definitions for them. The RDF definition can be used define what the object is, how you would interact with it, how it relates to other elements, and what other objects it is like or sub classes. This defines the basis for taxonomies defined amongst common sets of document elements. For example, dynamic web content often recreates GUI widgets using combinations of web page elements, style sheets, and script thus applying different meaning to the elements. This has benefits for the intraction between web content, user agents, and assistive technologies by providing for a discoverable interaction model. For example, this model can be used to allow a screen reader to provide a speech interface based on real semantics. The user agent could use the information to create device navigation mappings.

  Authors may use the following relationship names, listed here with their conventional interpretations. User agents, search engines, etc. may interpret these relationships in a variety of ways. For example, user agents may provide access to linked documents through a navigation bar.

  Users may extend this collection of relationships. However, extensions must be defined in their own namespace, and the relationship names must be referenced in documents as qualified names (e.g., dc:creator for the Dublin Core "creator" relationship).

  The following attributes will be standard. They are designed to define pertinent parts of a document for the purpose of accessibility. User agents may incorporate device equivalents, such as key mappings in the case of a desktop user agent, to navigate to these sections of a document.

  main
    This defines the main content of a document.
  secondary
    This is any unique section of the document. In the case of a portal, this may include but not be limited to: show times; current weather; or stocks to watch.
  navigation
    This is the navigation bar on a web document. This is typically a list of links to other pages on the site or other areas of the same document.
  banner
    A banner is usually defined as the advertisement at the top of a web page. The banner content typically contains the site or company logo and other key advertisements for the site.
  contentinfo
    This is information about the content on the page. For example, footnotes, copyrights, links to privacy statements, etc. would belong here.
  note
    The content is parenthetic or ancillary to the main content of the resource.
  seealso
    Indicates that the element contains content that is related to the main content of the page.
  search
    This is the search section of a web document. This is typically a form used to submit search requests about the site or is a more general Internet wide search service.