This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 21436 - @longdesc should, like @src, be a valid *non-empty* URL.
Summary: @longdesc should, like @src, be a valid *non-empty* URL.
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML Image Description Extension (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Charles McCathieNevile
QA Contact: HTML WG Bugzilla archive list
URL: http://www.w3.org/TR/2013/WD-html-lon...
Whiteboard:
Keywords: a11y, a11y_text-alt
Depends on:
Blocks:
 
Reported: 2013-03-29 17:24 UTC by Leif Halvard Silli
Modified: 2013-04-10 03:29 UTC (History)
3 users (show)

See Also:


Attachments

Description Leif Halvard Silli 2013-03-29 17:24:15 UTC
PROPOSAL:

  Update the definition of the content of the @longdesc attribute to match the requirements for the @src attribute.


CURRENT SITUATION:

  Referring to its definition in HTML5,[1] the HTML Image Description Extension spec currently says that the content of the @longdesc attribute MUST be:

   ]] a valid URL potentially surrounded by spaces [[

  This definition, however, is too loose. For contrast, the definition of the img element’s @src attribute pointes to HTML5’s definition of 'a validt non-empty URL'.[2] Thus, @src is required to be: [3]

   ]] a valid non-empty URL potentially surrounded by spaces [[


WHY CURRENT SITUATION IS DANGEROUS:

  The consequence of the above is that the HTML5 validator whines if the @src attribute only contains the empty string (including the empty string surrounded by spaces) - which is nice. But, conversely, if the @longdesc attribute contains the empty string (potentially surrounded by spaces), the validator does (currently) not whine.[4] 

  It is also worth mentioning that in the infamous Longdesc Lottery, then "is blank" (followed by "is not a valid URL"), is the first mentioned example of longdesc misuse.[5] When possible, the HTML Image Description Extension spec should demonstrate that it tries to avoid the issues that the Longdesc Lottery article takes up.

[1] http://www.w3.org/html/wg/drafts/html/master/infrastructure.html#valid-url-potentially-surrounded-by-spaces
[2] http://www.w3.org/html/wg/drafts/html/master/infrastructure.html#valid-non-empty-url
[3] http://www.w3.org/TR/html5/embedded-content-0.html#attr-img-src
[4] http://tinyurl.com/emptyLongdesc
[5] http://blog.whatwg.org/the-longdesc-lottery
Comment 1 Leif Halvard Silli 2013-03-29 20:03:56 UTC
As part of this bug fix, please do as well replace the following text - this:

 ]] If a longdesc attribute has invalid content, [[

With the following text: 

 ]] If the content of a longdesc attribute is not a
<a href="
http://www.w3.org/html/wg/drafts/html/master/infrastructure.html#valid-non-empty-url
" >valid non-empty-url</a> [[
Comment 2 Charles McCathieNevile 2013-03-31 12:12:47 UTC
I agree. I'll update this in the next draft. (I thought I had this already, actually)
Comment 3 Charles McCathieNevile 2013-04-03 12:33:42 UTC
Fixed as of https://dvcs.w3.org/hg/html-proposals/raw-file/0dd2e510d4e1/longdesc1/longdesc.html