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

"Michael[tm] Smith" <[email protected]> Wed, 20 May 2015 11:09:38 +0900
Newsgroups gmane.org.w3c.validator
Message-ID <[email protected]>
Hi Jason,

Jason Kiss <[email protected]>, 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
signature.asc (application/pgp-signature, 819 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCgAGBQJVW+ziAAoJEIfRdHe8OkuVaMAP/RyXc2ECTJRsFxm9KPjWVYmo
HDwBm2dNKBRCnUtkf6rKj3e3MecYpDVAMr6Dl8oGcyXv4qi15cbUk9GYSKMkZ2I0
DZz/vUorew8CI2eqP17/H1KXsax0BMe7vHAzSR7xsCq8UCpGTZRFPOf+t6AGqMhG
eKkz4m+MyhYFzEZxVrrRyWVZN27/xL6KkC4EdmME2HgMcyAtPgdcu9ZAxZci2/7Z
S6TeAJskUrPhO/ohEEUgqdQME1iHpAojMihzFzzh7Pam0Z7Ww350G9oojWmln3op
EZnMwMHCRbE0H6TjruwQYWKoAvyOTH5t9T9JWTnMDmsKy9Cn918iU6/7bg9U6SRm
9ja8EbvLoTFnXLHNeNC8zMkDY8WiMYNdcKv69/4bUBit97rOwZ1BhTYmEtaN0cfJ
koLztVvg8qxG18xCpshIQ5OAvHFT4WIURKtu5/vBENS35dFYK2IB4lvqdRMFJ9rY
ovNPiYtWlP5136xGiOix+DceejXlUm23sH7OH0Dfm+eK1pqYl04yxxCoqN6yAmh3
SVko385AJD8lFRqi0NEkZkhnM5gEUp1k6rWBbk1xOMRZN0dqjnNeB/kmg35W5/c8
WgQwrgbmNcGaOe3UTF/JucPaAUafbUOHQUjWpBHaPzpPiRIXc2QZSaXtNg9u+0vI
NJvf/D7Fzp1eoLuxeYW4
=DQZx
-----END PGP SIGNATURE-----