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

On Wed, Oct 21, 2009 at 2:08 PM, Steven Faulkner wrote:
> hi Ian,
>
>>> I agree, but developers are allowed to add behaviours and styles that
>>> turn a link into a button
>
>>Technically, they're not.
>
>
> OK , but practically they are and do.
>
> putting it another way:
>
> developers are _able_ to add behaviours and styles that turn a link into a
> button.
>
>>> and they won't get nagged when they check the conformance of the code
>
>>That's true, but only because it's nigh on impossible far validators to
>>check this.
> The reason why is immaterial, it still results in the same outcome, pseudo
> widgets are created without issue, but if they add ARIA to make them
> accessible they nagged about improper use of ARIA in HTML5.

Is this really different from those examples (feel free to move the
CSS out of the style="" attribute and into a stylesheet, with any
selector that'd then match the following elements):
   <p style="font-size: 24pt; font-weight: bold">This is a heading</p>
   <p>Let <em>x</em> and <em>y</em> be the trains' speed, in mph</p>
   <p>I am <span style='font-style: italic'>not</span> a number!</p>

(note how <em> was used instead of <var>, and <span style="font-style:
italic'> instead of <em>, which can be because the author used a
WYSIWYG editor, such as a <div contenteditable=true>, as can be found
in many CMSes and blogs)

Should the first paragraph above (faux heading) be conforming if
role=heading is set? (as written above, it is non-conforming because
"The p element should not be used when a more specific element is more
appropriate.", and <hN> or <hgroup><h1> is a "more specific element"
for a heading)

> If they are _able_ to do this without conformance errors

...flagged by a validator, which doesn't mean it is conforming.

> it follows that
> they should be able to add ARIA without conformance errors.

If they set it by script, it won't be testable by a validator either.

> reducued accessibility should not be the end result of testable conformance
> criteria.

Such as <img alt="the validator said I must add this attribute" src="..."> ? ;-)

(otherwise, I was about to write what Lars Gunther said, and he said
it much better than I'd have)

Oh, and, how about flagging <a href="javascript:..."> as an error? (or
at least a warning), as it's hardly a "link" (if you want <a
href="javascript:top.frames['other'].location.replace('something.html')">
you should rather use <a href="something.html" target=other
onclick="top.frames[this.target].location.replace(this.href)"> or
<span role=link
onclick="javascript:top.frames['other'].location.replace('something;html')">)

-- 
Thomas Broyer
/tɔ.ma.bʁwa.je/

Received on Wednesday, 21 October 2009 13:24:06 UTC