Yambo's Blog

When to leave an ALT tag attribute empty...

Posted by Yambo on 8 August 2012

Tags: , , ,

Yes, it may sound crazy, and I can hear the uproar of many SEO companies... however, I genuinely believe there are a few reasons NOT to include an ALT tag description on certain images - that's not to say there shouldn't be an empty ALT tag attribute.

So, what is an ALT tag?

ALT tags are used to specify alternative text for images on a website. The main purpose of an ALT tag attribute is to provide descriptive information of an image if it cannot be displayed correctly - this could be due to a slow Internet connection, an error in the source code, or if the user is using a screen reader/assistive technology.

Screen readers, or assistive technology, verbally read aloud the content of a web-page and the image description (ALT tag) for partially sighted or blind users. This helps them interact with the elements on the page and visualise the images by listening to the ALT tag descriptions.

SEO companies rate them so highly because it is one of the most important key factors in optimising your images for Search Engines.

We always add ALT tag attributes to our client's images. However, we have come across a few exceptions to the rule. For instance, the W3C accessibility standards (WCAG2) explains invisible or decorative images should be implemented in a way that can be ignored by assistive technologies.

Decoration, Formatting, Invisible: If non-text content is pure decoration, is used only for visual formatting, or is not presented to users, then it is implemented in a way that it can be ignored by assistive technology.

Our interpretation of this; there SHOULD ALWAYS be an ALT tag attribute associated with an image, but if the image is invisible or is only for decorative purposes you may consider using an empty ALT tag attribute instead - so assistive technology can then ignore these images and it won't impact the user experience.

A better example of this is when using a clear pixel image - clear pixels (spacer) images basically act as invisible images to allow some browsers to render the website correctly and/or to facilitate the layout of a web-page. From an accessibility point of view the clear pixel image carries no valid information what-so-ever. Keeping the ALT tag attribute empty (with no description) simply means assisted technology can ignore these elements without frustrating the user.

It then becomes a balancing act between an SEO report which is saying ALT tags should have full keyword rich descriptive terms and the W3C accessibility standards which states an ALT tag can be left empty if it carries no valid information.

We are by no means advocating empty ALT tags - we are merely explaining when an empty ALT tag may be necessary.