W3C home > Mailing lists > Public > wai-xtech@w3.org > November 2009

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

From: Lars Gunther <gunther@keryx.se>
Date: Mon, 09 Nov 2009 20:16:00 +0100
Message-ID: <4AF86A70.5040300@keryx.se>
To: HTMLWG WG <public-html@w3.org>
CC: public-html-request@w3.org, W3C WAI-XTECH <wai-xtech@w3.org>
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
Received on Monday, 9 November 2009 19:16:54 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:51:42 UTC