W3C home > Mailing lists > Public > www-validator@w3.org > May 2015

Re: Trailing space in ARIA attribute ID reference list causes validation error

From: Michael[tm] Smith <mike@w3.org>
Date: Wed, 20 May 2015 11:09:38 +0900
To: Jason Kiss <jason@accessibleculture.org>
Cc: www-validator@w3.org
Message-ID: <20150520020938.GK7733@sideshowbarker.net>
Hi Jason,

Jason Kiss <jason@accessibleculture.org>, 2015-05-20 13:38 +1200:
> Archived-At: <http://www.w3.org/mid/CACFCJLTc94HJmtg+hLy5q2eA7m64Y_VqtEpAeMLJkXR8HkiSYg@mail.gmail.com>
> 
> A trailing space in a space-separated list of IDREFs in @aria-controls
> or @aria-labelled causes validation errors. An example of the error
> message is "The aria-controls attribute must point to an element in
> the same document." Removing the trailing space clears the error.
...
> The first button and link pair have aria attributes with
> space-separated ID references with a trailing space, while the second
> pair don't. The errors are raised only for the first button and link.

Yeah, I’ll fix this in the validator regardless of whether or not the
relevant specs actually makes it clear (and I think the relevant spec in
this case may actually just be the ARIA spec, not the HTML spec).

> The algorithm for parsing space separated tokens [1] suggests this is a bug.

I think it actually is a bug—I’m just not sure if it’s a bug in the
validator or a bug (for failing to follow spec requirements) or a bug in
the relevant spec (for failing to make it clear that trailing whitespace is
allowed in aria-* values).

As far as what the relevant spec is here, I’m not sure (haven’t looked back
at the specs yet) but I think the datatype microsyntax of aria-* attributes
is defined in the ARIA spec and not in the HTML spec, and that the
conformance rules in the HTML spec for space separated tokens don’t apply
to the parsing of the values of aria-* attributes.

I’d happy to be wrong about that though.

But as I said, I’ll fix this in the validator, regardless.

  —Mike

> [1] http://www.w3.org/html/wg/drafts/html/master/infrastructure.html#set-of-space-separated-tokens

-- 
Michael[tm] Smith https://people.w3.org/mike

Received on Wednesday, 20 May 2015 02:10:02 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:18:13 UTC