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

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

From: Benjamin Hawkes-Lewis <bhawkeslewis@googlemail.com>
Date: Tue, 13 Mar 2012 16:30:20 +0000
Message-ID: <CAEhSh3dJbsTkrNG+-ULGpnoUqXyHEYCspoVQ7XXRWPXWEDcUBA@mail.gmail.com>
2012/3/13 Scott Gonz?lez <scott.gonzalez at gmail.com>:
> It's my understanding that authors should only apply ARIA via script.

No. Where do you understand that from?

> The
> redundancy cases seem to be the most reasonable use cases I've heard of for
> wanting ARIA in the initial markup, but even that seems wrong. What happens
> when you have type=range and role=slider, the UA doesn't understand the new
> types, and the script either never loads or has an error? The AT will pick
> up the role, but none of the functionality will be there. I don't see how
> that's better than not having the role applied.

First, there are ARIA annotations that do not depend on JS but do
overlap with native semantics, e.g.:

<nav>

<div role="navigation">

<nav role="navigation">

Second, plenty of authors do produce HTML that do not work without JS.
This isn't good practice, but there's little reason to discourage use
of ARIA markup _especially_ in those cases, where we do not discourage
other JS-dependent initial markup like (say):

<button type="button"> (without an associated form)

or

<a href="javascript: ...">

etc.

--
Benjamin Hawkes-Lewis
Received on Tuesday, 13 March 2012 09:30:20 UTC

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