[whatwg] Validator.nu: "Attribute role not allowed on element h2 at this point."
Arlen Walker
arlen.walker at gmail.com
Tue Jun 12 14:18:46 PDT 2012
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>
<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,
Arlen
------------------------------
In God we trust, all others must supply data
More information about the whatwg
mailing list