Alternative text, or alt text, is a crucial part of digital accessibility and a Web Content Accessibility Guidelines (WCAG) requirement. However, many fail to include it, rendering their content inaccessible.
So, what is alt text, why is it important, and why should you incorporate it into your website? Let’s dive in and answer these questions.
What is alt text?
Alt text is a “textual substitute for non-text content in web pages.” It functions as a replacement for the image, making it valuable if an image doesn’t load. These text descriptions can also be identified and read by screen readers, ensuring that screen reader users aren’t excluded from that content.
Though the ability to add alt text to images has existed since 1999, it wasn’t until 2006 that it was recognized as a necessary component for accessibility. That was when the National Federation of the Blind filed a lawsuit that challenged whether the Americans With Disabilities Act (ADA) applied to websites, setting the legal precedent that retailers must make their websites accessible under the ADA.
Why is it important?
Using alt text helps visitors to your website perceive the content regardless of their ability to see it. Without it, non-text content becomes inaccessible to any user with visual disabilities or to users who may need to have images blocked for a variety of reasons.
Additionally, alt text helps improve search engine optimization (SEO). Sites with proper alt text have better rankings in search engines, which will drive more traffic to your site. And people are more likely to return to a site that is accessible and user-friendly, giving you an advantage over your inaccessible competitors.
Incorporating alt text is important because people utilizing assistive technology, like screen readers or braille readers, rely on alt text to convey all the information on a web page. One in six people worldwide has some kind of disability, so being inaccessible can shut out a large portion of the population from your website. And, as previously stated, alt text is a WCAG requirement, and the World Wide Web Consortium (W3) provides many resources for its implementation.
What are some best practices?
There are some best practices to keep in mind when incorporating alt text into your website. It is not enough to simply add text — you must make sure the text you include complies with WCAG requirements. Follow these basic rules when incorporating alt text.
First, determine if the image is meaningful. Not every image on a web page conveys important information. Decorative images should be left null.
Next, you should make sure you concisely convey the important information the image conveys. The alt text should provide a clear enough understanding of the image that it can stand in for it. This is helpful for more than just screen readers — if a browser doesn’t load an image, you still want your content to be communicated. Including keywords is okay as long as it actually conveys important information to the user and isn’t just an attempt at “keyword stuffing.” Although alt text helps with SEO, that is not its primary purpose.
Above all, only present content as an image when it makes sense to do so. Building charts, infographics, and other stylized content in HTML makes them more accessible and eliminates the need for alt text.
The internet is a dynamic place full of dynamic content, and not all of it can be perceived by everyone without an alternative. Alt text is a fundamental part of any accessible website that includes images or other non-text content, both to ensure users of assistive devices aren’t excluded and to comply with WCAG requirements. Follow these guidelines to make your site more accessible and to ensure the accessibility of your future content.