Tim Tan Huynh [UX]

Alt text

  • 22 May 2023
  • In HTML, the alt attribute is an abbreviation for alternative text. The value of any alt instance should replace (describe) the image to which it applies. The description, if justifiable, should benefit the experience of persons who have visual impairment.

Global Accessibility Awareness Day has come and gone. The cynical part of me views it as another obscure Awareness Day that shouldn’t exist. However, the optimistic part of me views it as chance to highlight ignorance learning and, thus, it should exist. I’ve done HTML coding for years, and I know that implementing alt attribute values is easy to do, yet tricky to do well (consistently). I’ve reached the conclusion that there are no rules, only guidelines.

Still, I’m surprised that some people fail to understand the purpose of alt text for image elements. I avoid social-media platforms, so I’ve missed the recent trend of using the alt attribute to display the punchlines of jokes. This usage accidentally-on-purpose excludes persons who rely on screen-reading technology because of visual impairment. They can’t perceive the first part of jokes that are images of text instead of machine-readable text.

Even (staff of) the British Prime Minister has used the attribute in a way that’s not useful. “We’re growing the economy” is a vague description. It doesn’t benefit any user’s experience; imagine it being displayed as regular text, four times in a row. Moreover, the tweet has similar text as the description: “We are working day-in and day-out to grow the economy.” I would use a null (empty) description if the image needs to be split into quadrants as shown.

In the interest of learning and growth, here are some useful resources.

  1. Tips and Tricks (W3C)
  2. Write good Alt Text to describe images (Harvard University)