Possible Duplicate:
What is xhtml's role attribute? What do you use it for?
I noticed one element in Gmail had an attribute named “role”, i.e. <div role="whatever">. Technically that’s invalid. But I also know that most browsers will understand it without any trouble, as will jQuery (and perhaps straight JS?). Personally, I like this more than prefixing all custom attributes with “data-“.
Any idea why Google does this? And can I do it?
role=”” is an ARIA attribute used for screen readers and as an accessibility aid. Read http://www.accessibleculture.org/articles/2011/04/html5-aria-2011/ for more info. I recommend people start using them on their websites in order to aid those who view our sites in different ways the same level of access as a “normal” user.