Alternative Text

Images and other graphical content must include alternative text to make visual content accessible to people with vision impairments.

What is alt text?

Alt text is a short written description of an image that describes the appearance, content and/or function of an image. Screen readers read the alt text aloud to website visitors, allowing them to understand the content of the image.

University at Buffalo logo.

For example, this image has alt text that reads "University at Buffalo logo."

Why is alt text important?

  • Alt text provides descriptions of images for individuals who use screen readers, enabling them to understand the content and context of visuals that they cannot see.
  • Alt text conveys essential information that may not be available in the surrounding text, helping users grasp the full meaning of the content, especially in educational or informative settings.
  • Alt text enhances the overall user experience by ensuring that all users, regardless of their abilities, can navigate and understand content effectively.

How long should alt text be?

Alt text should be concise and meaningful, and ideally no more than 150 characters. Be sure to put a period at the end of the alt text.

What if my image is purely decorative?

Images that convey no meaning and are purely decorative do not need descriptive alt text, but they do require null alt text. In the UBCMS, check the box that says "This image does not require alt text." In HTML, use the null alt attribute (alt="") with the image element.

How do I write effective alt text?

  • Describe the image within the context of the page.
  • Avoid using the words like "image of" or "photo of".

What if my image is a link?

For images that are used to initiate an action or link to another page, the alt text should describe the function of the image. Avoid including the words "link to".

Can I use AI to write alt text?

It is possible to use generative artificial intelligence (GAI) to help you write alt text. Please remember that the text generated may not correctly or appropriately, describe your image, especially in the context of your webpage or document. Any alt text you generate with AI must be reviewed for accuracy and edited prior to publishing.

Here are two sample prompts you can try:

  1. Create a textual description of this image with all of the information in it for a screen reader. Include word for word any words or sentences in the image.
  2. Write alt text for this image. Include word for word any words or sentences in the image.