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

John Foliot On 09-11-09 21.21:

> Lars Gunther wrote:
>>> 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.
> 
> 
> You likely will not get any argument here, but what happens when an author
> *DOES* create sloppy code? 

  [...]
> So we tell the author,
> "...despite what you should be doing, you are doing something else.


Firstly, if the page is supposed to look one way without 
JavaScript and another way with javascript, then it isn't obvious 
to me how that "something else" that the author *should have 
produced* actually should have looked like.

(Hint: thus it is only confusing to talk about these unwilling 
authors who do not want to do the right think.)

> Therefore, if you insist on doing that, can you at least signal to AT what
> your intent is?"  Author, "Sure, but when I add @role to that element, the
> validators(s) flags my content as non-conformant, where before, without
> the @role statement, it *was* conformant" (from the technical perspective,
> not the greater semantic/logic perspective).
> 
> Now what? We've just created a scenario where _reducing_ accessibility
> improves conformance results - what's wrong with *that* picture?

I don't think this is obvious. Firstly, aria="button" would be 
incorrect when JavaScript is disabled. So for the claim about 
reduction of accessibility to be true, then the aria role="button" 
would have to be without any effect whenever JavaScript is disabled.

So this leads back to your question: What when the author does 
create sloppy code?

The point that Lars had was that <a role="button" > in itself is 
sloppy code. And that is also the crux in my argumet: It is not my 
opinion that it is. It just a fact that if the javascript-disabled 
user agent picks it up and present it as a button, then it is 
sloppy code to insert role="button" directly into the code.

What is the solution to that? Who is the ones that should 
suffer/benefit, those with javascript disabled or those with it 
on? Or am I and Lars just making it up that this will be a problem 
for those with JavaScript disabled?
-- 
leif halvard silli

Received on Monday, 9 November 2009 21:02:51 UTC