[pLog-svn] r5298 - plog/branches/lifetype-1.2/templates/summary

BalearWeb balearweb at balearweb.com
Thu Apr 12 06:58:21 EDT 2007


Reto Hugi wrote:

 > and having the portrait picture as a background image is semantically
 > not correct. not in this context. so I welcome the changes.
It depends on if you consider these images as content with semantic 
meaning or just as decorative images.

An "alt" text that just repeats the name of the author doesn't really 
add any meaning to the web page, because the name of the author is 
already part of the article excerpt.

But the problem I see with using a div with a background is that we 
still have to hard code the styling information to the  XHTML and we 
want to keep it free of presentational markup.

So it is probably a better solution to use a IMG. As for the ALT text, 
after reading what the W3C recommends 
http://www.w3.org/QA/Tips/altAttribute I think we can leave it empty:

- <img src="{$picture->getPreviewLink()}"  width="60" height="60" 
class="postgrav" />

+ <img src="{$picture->getPreviewLink()}" width="60" height="60" 
class="postgrav" alt="" />


 > I'd even go one step further and question the height and with attributes
 > set in the template, as they could easily be set in the css (if at all),
 > but as those attributes are valid in xhtml strict, it's not something I
 > care much about. ;)

Adding the height and width improves the user experience and the page 
seems to load faster. It prevents the text from moving around during 
download. But I'm not sure which choice is the best. On the other hand 
defining the height and width in the CSS helps maintenance. So I'm no 
sure which is the best option.




More information about the pLog-svn mailing list