Add punctuation to your alt text

Providing a concise, accurate text description of an image is an important thing to do. It allows people who cannot see the image understand its content.

To add a description to an image, author a string inside of an alt attribute declared on an img element. Assistive technology will recognize the presence of the alt attribute and read the string as it moves through the page or view.

In addition to making sure your alt description is accurate, there’s one other thing you can do that makes for a good experience: ending your alt text string with punctuation.

<img
  src="puppy.jpg"
  alt="A golden retriever puppy wearing a tiny raincoat." />

The presence of end punctuation such as a period will make the voice pause a bit before announcing the next words in sequence for most assistive technology that utilizes a synthesized voice. This makes the transition to non-image content feel a lot more natural.

While alt text end punctuation isn’t technically required for compliance, it makes for a better experience for your audience. These little details demonstrate care and consideration, and are noticed and appreciated by those who rely on them.