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

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

From: Arlen Walker <arlen.walker@gmail.com>
Date: Tue, 12 Jun 2012 16:18:46 -0500
Message-Id: <89149E5E-C15F-4BDC-81B7-640E89557356@gmail.com>
To: whatwg <whatwg@whatwg.org>

On Jun 8, 2012, at 5:46 PM, Ian Hickson wrote:

>> I've used role and/or redundant ARIA within the scripting environment to 
>> minimize calls in applications checking for roles. Redundancy doesn't 
>> harm anything, I actively promote it, as it does help, sometimes.
> I disagree with that premise, for what it's worth. Redundancy can lead to 
> a number of problems; on the Web, in particular, it's common for 
> redundancy to lead to cargo-cult authoring mistakes.

Simply writing code can lead to cargo-culter mistakes. ;{>} Should writing code be barred?

Seriously, I can see sending a warning, saying "should not," that it's not a good idea. But barring it seems both unnecessary and inconsistent with the rest of the spec. Why do ARIA-related attributes get treated differently from any other HTML attribute? In no other HTML attribute is the author barred from explicitly specifying a default value. To take consistency to its logical end, the ARIA semantic default from the table might be considered the "missing-value-default" found in other HTML attributes. Is there something I'm missing that makes this Not A Good Idea?

To get down to specifics, I'd expect:

<nav role>
<nav role="navigation">

to be identical in the spec's eyes, excepting the first being the preferred (but not required) form.

When I first read the spec I didn't even *see* the "should not match default implicit semantics" line, because it was so alien a concept to me.

> For example, expert A 
> writes a Web page with some redundant roles, author B copies markup from 
> that page and changes it to suit their needs, but ignores the previously 
> "redundant" bits and thus ends up with conflicting information instead of 
> redundant information. Page ends up being sub-optimally accessible, 
> because the previously "redundant" accessibility annotations now conflict 
> with the page's real semantics, and are wrong.

I don't see how this differs materially from someone copying a batch of code with valid ARIA  markup in place, and changing it so the content is at odds with the valid "non-redundant" ARIA markup. And, in fact, allowing the author to specify the default would preserve ARIA in cargo-culted code if the elements themselves get changed to, say, <div>'s.

Have Fun,

In God we trust, all others must supply data
Received on Tuesday, 12 June 2012 21:19:22 UTC

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