W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2010

[whatwg] img as a layout tool to describe the displayed region of a CSS background-image

From: Ashley Sheridan <ash@ashleysheridan.co.uk>
Date: Wed, 28 Apr 2010 12:40:34 +0100
Message-ID: <1272454834.2280.55.camel@localhost>
On Wed, 2010-04-28 at 13:41 +0200, Giorgio Maone wrote:

> I believe the spec is trying to stigmatize old-times spacer images used 
> to layout other HTML elements, like
> 
> <img src="spacer.gif" width="100" height="1">
> 
> which are overly ugly and meaningless now that there's nothing you can't 
> layout by CSS.
> -- G
> 
> Ingo Chao wrote, On 28/04/2010 13.31:
> > http://dev.w3.org/html5/spec/Overview.html#the-img-element
> > "The img must not be used as a layout tool. In particular, img
> > elements should not be used to display transparent images, as they
> > rarely convey meaning and rarely add anything useful to the document."
> >
> > An img with a given transparent image for src cuts an area of a sprite.
> > ( = img as a layout tool to describe the displayed region of a CSS
> > background-image.)
> >
> > Is this usage of the img element considered invalid (non-conforming)?
> >
> > Thanks.
> >
> >    
> 


But still, using a transparent image with some alt text to convey
information about a background image is just as bad. It's breaking the
relationship between content and the meaning of that content. A
background image should be just that, and shouldn't have any impact on
the meaning of information. Likewise, colour shouldn't be relied on to
convey information, as there are cases where colours can't be displayed
or aren't transferred if the information is grabbed as an excerpt to be
used elsewhere.

Thanks,
Ash
http://www.ashleysheridan.co.uk


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20100428/af1a2c13/attachment.htm>
Received on Wednesday, 28 April 2010 04:40:34 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:22 UTC