All the described technique seems problematic to me.
Jennifer points out:
- You cannot attach alternate text to sections for accessibility purposes.
- CSS Sprite and IE6 PNG fix incompatible
- Images will not be printed on printouts unless the client option for printing background images is selected (this is bad for logos and menus, etc.).
- For images on pages (in fact, these are not background images) it seems semantically bad to hide the image in CSS.
In 1, given that these are background images and not semantically images in themselves, I believe that the right approach is to put this text directly in the markup and hide it with CSS, and not vice versa.
Number 2 is valid, but not the end of the world. Acting on 3 is an abuse of imho - if the user does not want to print background images, why do you force it? Again, this returns to semantic interpretation.
Number 4 I completely agree with this, but if you just hide the image in the sprite conglomerate, anyway, what do you get? You can discuss this, but <img> has a semantic meaning representing a resource with a URI, and therefore the URI must be distinct, independent of the interpreted CSS. View / Copy / Save Image will adversely affect this.
It also seems to respond rather slowly in my FF (which is admittedly prone to tab-abuse), I believe that circumcising mathematicians take little effort.
In short, I believe that the existing background-image / position technique is superior.
source share