This attribute describes the role(s) the current element plays in the context of the document. 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>
It is possible to define additional role values. Such values MUST be defined in their own namespace. Note that current best practice is that the URI associated with that namespace resolve to a
resource that allows for the discovery of the definition of the roles in the namespace. Example definitions include the RDF Schema for the XHTML role attribute values in Appendix I, and the Web Accessibility Initiative's work on an RDF Taxonomy [WAIRDF].
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.
The following attribute values 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.
- definition
- The contents of the associated element represent a definition (e.g., of a term or concept). If there is a dfn element within the contents,
then that represents the term being defined.
- 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.