W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2012

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

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 13 Mar 2012 00:52:00 +0000 (UTC)
Message-ID: <Pine.LNX.4.64.1203130048260.6189@ps20323.dreamhostps.com>
On Mon, 12 Mar 2012, Hugh Guiney wrote:
>
> Why not?
> 
> I have this in an otherwise-valid HTML5 + SVG 1.1 + MathML 2.0 + RDFa 
> Lite 1.1 document:
> 
> <hgroup>
>   <h1>Company Name</h1>
>   <h2 role="presentation">Tagline</h2>
> </hgroup>
> 
> Spec says:
> 
> > Authors must not set the ARIA?role?and?aria-*?attributes in a manner 
> > that conflicts with the semantics described in the following table, 
> > except that the?presentation?role may always be used.

The validator is probably just not up to date.

Note that that in this case the validator is probably right. If it's just 
presentational, why are you using <h2>? It doesn't seem presentational to 
me. I think you are incorrectly using role=presentational here.


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.


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.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Monday, 12 March 2012 17:52:00 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:40 UTC