[whatwg] rel=license example

The rel=license example in
<http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#link-type-license>
looks like:

 <body>
  <h1>Kissat</h1>
  <nav> <a href="../">Return to photo index</a> </nav>
  <img src="/pix/39627052_fd8dcd98b5.jpg">
  <p>One of them has six toes!</p>
  ...
 </body>

Looking down the list of <img> alternative text requirements in the
table of contents, the <img> seems to be "A key part of the content"
(<http://www.whatwg.org/specs/web-apps/current-work/multipage/embedded-content-0.html#a-key-part-of-the-content>).

It's presumably not "possible for detailed alternative text to be
provided", because it's a photo rather than some kind of describable
diagram. Maybe "the nature of the image might be such that providing
thorough alternative text is impractical" but I can't tell if this
applies since I don't know what the image is. The "Images whose
contents are not known" case looks like the best fit. That requires
one of three things:

There's no title attribute, so it fails the first requirement.

There's no figure element, so it fails the second requirement.

Therefore it requires: "The img element is part of the only paragraph
directly in its section, and is the only img element without an alt
attribute in its section, and its section has an associated heading."

Its section is the section created by the <body> element. I think the
paragraphs directly in the section are "<img ...>", "One of them has
six toes!", "...". (I thought "Return to photo index" was too, but
then I realised it's not "directly in" the section, assuming that
means it must consist of direct child nodes. Also I'm assuming the
paragraph formed explicitly by a <p> element is directly in the parent
element of the <p>, rather than being directly in the <p> itself). So
the img element isn't part of the only paragraph, and it fails the
third requirement too.

Conclusions probably include a subset of the following:

 * The license example is invalid.
 * The validity rules for <img> are far too complex since even the
editor got them wrong.
 * The validity rules for <img> are far too complex since it takes
this much effort to work out that the editor got them wrong.
 * The validity rules for <img> are far too complex since I concluded
the editor got them wrong when actually he got them right.
 * The validity rules for <img> are not explained sufficiently clearly
since I concluded the editor got it wrong when actually he got it
right.
 * I'm too stupid to understand HTML since the spec is sufficiently
simple and sufficiently clear and I still concluded the editor got it
wrong when actually he got it right.

-- 
Philip Taylor
excors at gmail.com

Received on Thursday, 7 May 2009 09:51:08 UTC