↓ Ir para o conteúdo principal

← todas as notas

📎 Webclip

Why you should never ignore the alt attribute

The page argues that the alt attribute has long been part of HTML and matters for both accessibility and search visibility. It should describe the image in a way that fits the page context, and decorative images can use an empty alt attribute instead of leaving it out.

It also warns against alt text that is too vague, too generic, copied from nearby page text, or unnecessarily long. The examples show that good alt text is concise and specific, while poor alt text misses important context or repeats too much detail.

Reading notes
#

  • The alt attribute was introduced in HTML 2 in 1995 and has been used for a long time.
  • It helps search engine crawlers and screen readers understand what an image is.
  • Alt text should reflect the nature of the image, not give a literal description when a more useful description fits the context.
  • The detail in alt text should match the content of the rest of the page.
  • If an image is decorative, an empty alt attribute is better than omitting it.
  • Screen readers may read out the image URL if no alt attribute is included.
  • Alt text supports accessibility by giving a readable text version of an image.
  • Alt text can help SEO because bots can read it while they cannot read the image itself.
  • Copying page text into alt text may look like spam to crawlers and can harm SEO.
  • Good alt text is clear, concise, and specific.
  • Subjective adjectives should only be used when they make sense in the site’s context.
  • Weak alt text can be too vague, such as just naming an object.
  • Alt text can become too long and should stay succinct and descriptive.