tags:

views:

68

answers:

2

I've been looking at the use of the role attribute for HTML5/XHTML in the W3C: http://www.w3.org/TR/wai-aria/roles and was wondering if there are any sites that use this or examples of how/when to use the role attribute.

I understand how it works, but would like to see how other people have used in their sites/projects.

Also, am i correct in assuming that you need to use the values defined in the link above (e.g article, columnheader, definition, directory, document etc), or are you also able to create your own values/definitions for the role attribute?

A: 

The roles are used to inform accessibility tools about your page so you need to use the vocabulary that's understood by them. So you should stick to the values defined in the ARIA document.

You can see how I've used them here . I wouldn't claim it to be a thorough treatment of roles but it does show a few in use.

See also

Alohci
A: 

Majority of Yahoo websites use it http://www.yahoo.com

YUI encourages role attribute, if you are not sure how to put role, this tool might help you. http://developer.yahoo.com/yui/grids/builder/

You can also find role attribute on my websites e.g http://www.hereismystuff.com (or purplegene.com etc)

Markandey Singh