[whatwg] Validator.nu: "Attribute role not allowed on element h2 at this point."

Charles Pritchard chuck at jumis.com
Mon Mar 12 18:16:29 PDT 2012

On 3/12/2012 5:52 PM, Ian Hickson wrote:
> On Mon, 12 Mar 2012, Charles Pritchard wrote:
>> >
>> >  Ignore the error, the HTML5 spec does not reflect implementations in
>> >  this section about ARIA.
>> >
>> >  The warning is not helpful to authors nor does it accurately describe
>> >  the means in which ATs work with ARIA.
> Are you saying you think the spec is wrong here and we should not allow
> role="presentational"? I tend to agree, but I'm not sure it's worth it to
> try and work out exactly when role=presentational is harmful (as in this
> case) and when it's not.

Consider something like CSS ::outside; it's a nice feature, but it's not 
in many browsers.
If it were, it'd make more sense for authors to mark up 
decorative/presentation text in CSS.

Pragmatically authors they have to make decisions, and sometimes that 
means various techniques with HTML4 and strange mixes of roles.

> On Mon, 12 Mar 2012, Charles Pritchard wrote:
>> >  
>> >  These should only be warnings, not errors. The language "Authors must
>> >  not" is inappropriate.
> Warnings are generally not useful. Either something is fine and we should
> support it, or it's wrong and we should alert the author. I think "must"
> is very much the appropriate requirement level here.

 From the implementation-side, the spec is wrong, it ranks native HTML 
semantics above ARIA DOM semantics.

As a "best practices" note, it seems overly optimistic. There are 
situations with AT navigation where role conflicts do occur and/or 
redundancy in tagging is helpful.

I don't believe it is appropriate for HTML to place restrictions on ARIA 
DOM. It's does not reflect implementations. The HTML spec should only 
specify what the default mappings are for HTML elements to ARIA.
Authors may be advised to test AT software with their product.

This statement is more in line with practice: "Authors must test 
accessibility tree as part of development and usage of ARIA semantics.".


More information about the whatwg mailing list