开发者

Are there any examples of sites that use the role attribute in HTML5/XHTML?

I've been looking at the use of the role attribute for 开发者_如何学JAVAHTML5/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?


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)


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

  • http://www.paciellogroup.com/blog/
  • http://burningbird.net/
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜