XML News from Sunday, April 13, 2008

The W3C HTML working group has posted the last call working draft of XHTML Role Attribute Module.

The Role Attribute Module defines the role attribute and some values for that attribute in the default vocabulary space. The role attribute takes as its value one or more whitespace separated CURIEs [CURIE]. Any non-qualified value MUST be interpreted as being from the XHTML vocabulary at http://www.w3.org/1999/xhtml/vocab#. For a list of all roles in the default vocabulary, see [XHTMLVOCAB].

The attribute describes the role(s) the current element plays in the context of the document. This can be used, for example, by applications and assistive technologies to determine the purpose of an element. This could allow 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. It could also be used as a mechanism for annotating portions of a document in a domain specific way (e.g., a legal term taxonomy).

This example is informative
<ul role="navigation sitemap">
    <li href="downloads">Downloads</li>
    <li href="docs">Documentation</li>

    <li href="news">News</li>

The following list represents some of the roles defined in the default vocabulary. They are intended to define regions of the document to help orient the user.

A region that contains the prime heading or internal title of a page.

Most of the content of a banner is site-oriented, rather than being page-specific. Site-oriented content typically includes things such as the logo of the site sponsor, the main heading for the page, and site-specific search tool. Typically this appears at the top of the page spanning the full width.

Any section of the document that supports but is separable from the main content, but is semantically meaningful on its own even when separated from it.

There are various types of content that would appropriately have this role. For example, in the case of a portal, this may include but not be limited to show times, current weather, related articles, or stocks to watch. The content should be relevant to the main content; if it is completely separable, a more general role should be used instead.

Meta information about the content on the page or the page as a whole.

For example, footnotes, copyrights, links to privacy statements, etc. would belong here.

A definition of a term or concept.

A role is not provided to specify the term being defined, although host languages may provide such an element; in XHTML this is the dfn element. The defined term should be included in such an element even when occurring within an element having the definition role.

Main content in a document.

This marks the content that is directly related to or expands upon the central topic of the page.

A collection of links suitable for use when navigating the document or related documents.
The content is parenthetic or ancillary to the main content of the resource.
The search tool of a web document.

This is typically a form used to submit search requests about the site or to a more general Internet search service.

You can add other values for this attribute by placing the values in a namespace. (Haven't we learned yet that namespaced attribute values are a bad idea?)