W3C home > Mailing lists > Public > www-validator@w3.org > December 2012

Re: Attribute srcset not allowed on element img at this point.

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Tue, 18 Dec 2012 10:43:46 +0200
Message-ID: <50D02CC2.3090401@cs.tut.fi>
To: Ed Palmer <ed.palmer@gmail.com>
CC: www-validator@w3.org
2012-12-17 15:26, Ed Palmer wrote:

> Sample document:
> http://en.wikipedia.org/wiki/User:Gadget850/srcset
>
> When validating an English Wikipedia page, the error "Attribute srcset
> not allowed on element img at this point" is displayed.

It's a bit misleading, because the attribute is not allowed at all. But 
if I remember correctly, the current wording was adopted for some 
specific reason. It still sounds odd, since in SGML and XML the order of 
attribute specifications is not significant - by a DTD, an attribute is 
either allowed or disallowed.

> Srcset is not in the live HTML5 specification:
> http://dev.w3.org/html5/spec-author-view/the-img-element.html#the-img-element

That's not a live specification but the newest editor's draft, which may 
and will change without prior notice. Right now, it is currently titled 
"HTML5 W3C Working Draft 11 October 2012", which is probably an error; 
the link "Latest Published Version" points to "HTML5: Edition for Web 
Authors W3C Working Draft 25 October 2012". So the working group draft 
would appear to be newer than the editor's draft!

Anyway, the srcset attribute is not present in the current version of 
the working group draft.

> But is in the living standard:
> http://www.whatwg.org/specs/web-apps/current-work/multipage/embedded-content-1.html#attr-img-srcset

"Living standard" is an oxymoron, but that's not the point here.

The point is that the "HTML5 mode" of the W3C Markup Validator is an 
experimental and completely undocumented (as regards to published 
documentation) "feature", which is effectively a separate program 
embedded to use the same user interface and some shared code. That 
program is basically a copy of what runs at http://validator.nu but not 
necessarily an up-to-date copy.

Everything in the W3C Markup Validator documentation reflects the 
original idea of an SGML or XML validator, a simple tool that checks a 
document against any Document Type Definition (DTD) and nothing more 
(though there have been some minor additions to that functionality).

There is no description of what <!doctype html> (or manual selection of 
"HTML5 (experimental)" means - not even whether it checks against the 
WHATWG document or against the W3C WG document.

My guess is that we won't get any documentation about that anytime soon. 
And would it really help much? People don't read documentation much 
these days, not even FAQs. But what might be possible is an improvement 
of the current warning:

"Info Using experimental feature: HTML5 Conformance Checker.

The validator checked your document with an experimental feature: HTML5 
Conformance Checker. This feature has been made available for your 
convenience, but be aware that it may be unreliable, or not perfectly up 
to date with the latest development of some cutting-edge technologies. 
If you find any issues with this feature, please report them. Thank you."

It's verbose but not very descriptive. My proposal:

"Info: Using HTML5 Conformance Checker.

These are results from a check against the draft HTML5 specification by 
the W3C HTML Working Group [http://www.w3.org/TR/html5/]. The method of 
checking is different from the (DTD-based) method that the W3C Markup 
Validator uses otherwise, and should be regarded as experimental.
If you find any issues with this feature, please report them."

The big issue is of course whether the checker is actually based on W3C 
HTML. If not, the wording and link should be modified accordingly, e.g. 
"... against some version of HTML Living Standard by the WHATWG 
[http://www.whatwg.org/specs/web-apps/current-work/multipage/]".

Now what W3C HTML5 has reached Candidate Recommendation status, it's 
time to decide on this, isn't it?

Yucca
Received on Tuesday, 18 December 2012 08:44:26 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 18 December 2012 08:44:29 GMT