Re: ARIA roles added to the a element should be conforming in HTML5.

2009-11-08 03:41, Jonas Sicking skrev:
> The harm that I see is loosing the ability to have a clear message for
> what the right way to do things is.

This was my fear as well when I tried to suggest a middle ground for 
this issue. Since it was a awhile I'll repeat myself.

<a role="button"> should be forbidden when hard-coded onto the page for 
these reasons:

1. It is sloppy markup. Conformant HTML should be the best possible.

2. It is possibly confusing if JavaScript is turned off, since it will
not act as a button in that case.

The validator's error message should be carefully worded to suggest that 
authors instead of removing @role change the tag to <button>

@role="button" should, however, be allowed if the role is added using 
JavaScript, and *the spec should say so*.

Since validators do not pick up attributes set with client side scripts, 
AFAIK, there will be no error message = no "penalty".

In my estimation, this is not only a reasonable compromise, but the 
overall best solution, all aspects considered.

+

YUI, JQuery, Prototype/Scriptaculous, Dojo can be evangelized into 
setting @role dynamically (if that's not the case already) and have 
their manuals suggest such usage as well.

If they get it right, so will 95 % of all websites.


-- 
Lars Gunther
http://keryx.se/
http://twitter.com/itpastorn/
http://itpastorn.blogspot.com/

Received on Monday, 9 November 2009 19:17:02 UTC