Skip to main content
The importance of alt and title attributes: accessibility and SEO

The importance of alt and title attributes: accessibility and SEO

Why are alt attributes important?

The primary purpose of an alt attribute is to provide a text alternative for an image. This is especially important for blind or visually impaired people who rely on screen readers.

But even when images cannot be loaded for technical reasons, a well-written alt attribute ensures that the content is not lost. In addition, alt texts help search engines categorize images better, which has a positive effect on a website's findability.

The difference between alt and title attributes

Alt and title attributes are often confused, but they serve different purposes:

  • Alt attributes serve as text alternatives for images and are crucial for accessibility. They are read aloud by screen readers and appear when an image fails to load.
  • Title attributes provide additional information that most browsers display as a tooltip when users hover over an element with the mouse. They are not primarily intended for accessibility and are often ignored or not reliably interpreted by screen readers.

What this is not about: title attributes

The title attribute is often seen as an alternative to the alt attribute. However, it is not suitable for providing relevant information because:

  • Screen readers often do not interpret the title attribute correctly,
  • it is displayed differently depending on the device,
  • it can create redundant information,
  • there are better alternatives, such as ARIA attributes, which were specifically developed to improve the accessibility of web content for people with disabilities.

Although the use of the title attribute is recommended in WCAG 2.0 for links, its limitations are noted in the same place. If visual information cannot be made directly visible, suitable ARIA attributes should be used instead.

How are alt attributes used correctly?

Whether an image needs an alt attribute and how it should be formulated depends on whether it has content-related significance or serves only decorative purposes.

Decorative graphics

Images that do not offer any informational value, such as design elements or placeholder graphics, should be given an empty alt attribute. This way, screen readers ignore this content, which improves accessibility.

Informative graphics

Images that convey information should be given suitable alt text:

  • Meaningful symbols: For example, a telephone or fax symbol that visually distinguishes between two numbers. This information should also be reflected in the alt attribute.
  • Images as the sole content of a link: Here, the image should not be described, but rather the destination of the link. A logo that leads to the homepage should therefore not be labeled “Logo of XYZ,” but rather “To the homepage of XYZ.”
  • Additional image information: If a text already contains the essential information, but the image shows additional details, the alt text should supplement this. An example would be the text “Cat, 10 years old” and an image of a black-and-white spotted cat. The alt text could be: “Black-and-white spotted cat sleeping.”
  • Images with text content: If a graphic contains text, that text should be reproduced in the alt attribute.
  • Images intended to convey emotions: In this case, the image should not be described, but the intended message should be conveyed. Instead of “A laughing family,” “We are family-friendly” would be more suitable as alt text.
  • Photos of people: Individual images should be labeled with the person's name. Group photos should instead describe the group.

What should be avoided with alt attributes?

  • Terms such as “image with,” “image about,” or “depiction of” are unnecessary, since it is already clear that it is a graphic.
  • Alt attributes should be limited to a maximum of 80 characters, as Braille keyboards wrap to a new line after this length, which can make readability more difficult.

Accessibility through alt attributes

Alt attributes play an essential role in accessibility while also improving search engine optimization. They help make visual information accessible to users who cannot see images. What is crucial is that alt texts are informative, precise, and not too long. With the right wording, websites can achieve better usability and inclusion.

Aktuelles zu „Accessibility“

Alle Beiträge anzeigen

Sie wollen ein Projekt mit uns realisieren?

Schreiben Sie uns gern oder rufen Sie uns an unter

030 220 56 30 0