Google says CSS Sprites and Unobtrusive Javascript == Good
I was reading an article the other day about CSS Sprites and whether or not Google could penalize you for using these methods. If you haven’t heard of CSS Sprites, it is a technique used to combine images you want to use as backgrounds and combine them all in one jpg, gif or any other format you would like. It lowers the amount of times your website will have to make HTTP requests. Typically I use a lot of CSS Sprites for navigation elements but it is not unheard of to actually combine several layout elements in one image.
The article which I can’t find at the moment (I wasn’t expecting to write about it) went on to say that Google has never come out and told us their view of CSS Sprites. Basically with CSS Sprites you have the actual text for elements still in the source code for search engines and accessibility reasons but display the image as a CSS background. Of course not all CSS Sprites is used for text alternatives, but I would say a great deal of the time they are. We would think Google wouldn’t care about this but we all know how Google feels about hidden text and the shady Black Hat SEO’s stuffing key words. We hope that Google is smart enough to know if we are stuffing keywords or we are actually using CSS Sprites properly
Google Speaks and sets us free
I got home tonight and came across an article entitled “Design patterns for accessible, crawlable and indexable content” on the Google Webmaster Central blog. Where low and behold Google tells us:
Having meaningful text to go with navigational links is equally important for Googlebot as well as users who cannot perceive the meaning of an image. While designing the look and feel of navigational links on your site, you may have chosen to go with images that function as links, e.g., by placing <img> tags within <a> elements. That design enables you to place the descriptive text as an alt attribute on the <img> tag.
But what if you’ve switched to using CSS sprites to optimize page loading? It’s still possible to include that all-important descriptive text when applying CSS sprites;
What about that Javascript?
Clearly Google is pushing us for better techniques not only for load time, but accessibility while ensuring our content gets indexed and crawled. It was really refreshing to hear Google saying how it is important to have unobtrusive Javascript. Google goes on to compare the Googlebot in the same context of a visually impaired user. We shouldn’t have our Javascript in our HTML, we need to make sure that if user doesn’t have Javascript enabled that the link brings them to a page representative of the link they clicked.
In Conclusion
Sometimes it is hard to get other developers and executives onboard and understand how important all these newer techniques for complying with web standards, accessibility, and optimization. One thing is always true and that is everyone listens to Google. How many times has an executive come to you just drooling all over Google and their accomplishments? Most of the time I can’t stand how everyone is bowing down to Google, for one Google doesn’t practice enough web standards themselves and this is representative in a number of their services.
If Google continues to write more articles such as this, it will make our battles internally with our executives and other people that brush standards to the side a lot easier. They might actually listen to us and appreciate what we do and our passion for perfectionism with web Standards. Maybe these people will just stop saying “let’s just get it done” and actually put time in the budget to research and plan correctly to create our applications the way they should be developed.
February 20th, 2010 at 5:46 am
I was very pleased to find this site. I wanted to thank you for this great read!!
May 3rd, 2010 at 1:23 pm
you need to write more and moree, love your stuff, bookmarked