W3C home > Mailing lists > Public > public-html@w3.org > April 2007

Re: Let every element have a src attribute

From: Dao Gottwald <dao@design-noir.de>
Date: Tue, 03 Apr 2007 10:35:26 +0200
Message-ID: <461211CE.90002@design-noir.de>
To: Jeff Schiller <codedread@gmail.com>
CC: Matthew Raymond <mattraymond@earthlink.net>, public-html@w3.org

Jeff Schiller wrote:
>  <p src="image-i-really-want-to-show.png">Fallback text describing
> the image here</p>
> changes the semantics of the <p> element.  The <p> element is a
> paragraph, not an image.

As in "the <p> element is a paragraph, not text"?
Seriously, why can't an image be a paragraph?

> And here's a worse scenario, what if we need multiple paragraphs and
> other markup to describe an image in the fallback case:
>  <div src="image-i-really-want-to-show.png"><p>The image shown is
> from <a href="">...</a>....</p><p>It reperesents ...</p></div>
> Now the image has become a div - but it's really still just an image
> with some meaning - why are we switching markup tags?

In the latter case, the image represents multiple paragraphs, so you're 
using div. Sounds very sane to me.

> But to me, the biggest argument against the src attribute everywhere
> is this:  Let's say authors start heavily using it - now suddenly
> older user agents, which might have been able to display the image in
> the first place, will be ignoring the src attribute and only
> displaying the fallback text.  Why?  Suddenly, pages that could have
> still rendered in older user agents will stop displaying their images.

That's the minimum price that you have to pay when evolving a spec.
The web site won't break in old user agents, which is a real advantage 
over most other changes that will make HTML5.

> The HTML:object already exists for this exact fallback mechanism, we
> should be clarifying any unspecified behavior of the HTML:object
> element, not introducing new attributes/elements that do the same
> thing but "break" older user agents.

Old user agent won't magically fix their object implementation. And 
because they don't necessarily support the fallback mechanism, this 
really breaks your site.

> To me, this is just cleaner represented as:
>  <object src="image-i-really-want-to-show.png">fallback here, could
> be another object, could be markup, etc</object>

For fallback chains, you should still be using object. I'd never propose 
<p><p></p></p>, even if it worked (it doesn't).
Received on Tuesday, 3 April 2007 08:35:29 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:18 UTC