I have always disliked using ids and classes as selectors for obvious reasons: ids are unique and classes have to do with styles and should be able to change without affecting functionality of the site.
I used to create things like
<div rel="foo">...</div>
$("[rel=foo]").click(..);
What is the proper way to do this with HTML5? I was tempted by role, but it appears, this attribute has a specific meaning and purpose.
I am just learning HTML5 and your help is greatly appreciated!