Alt Text Requirements for Web Images

Section 508 of the 2017 Rehabilitation Act requires all images on Office of Critical Minerals and Energy Innovation (CMEI) websites and applications to have alternative (alt) text. Alt text describes images in words so they can be read and understood by visitors using screen readers.

Writing Alt Text

When writing alt text, follow these guidelines:

  • Energy.gov requires alt text to be between 20 and 250 characters long. Be concise.
  • Alt text should convey why the image was included in or relevant to the content, rather than simply describing how the image looks.
    • If the alt text is a computer-generated, visual description of the image, replace it. Computer-generated descriptions often don't describe the relevant content of the image. 
  • Include all critical information, such as numbers and other data. 
  • Do not include information that is unimportant to the viewer (e.g., descriptions of people in an image) unless it's relevant (e.g., an article about glasses).
  • Do not duplicate information that appears in the image's caption or the content of the page. If the image itself is described elsewhere on the page, keep the alt text minimal.
  • Do not start alt text with phrases like “Photo of...” or “Illustration of...” A screen reader will already automatically start with this.
  • Alt text must be in the same language as the main content. For example, if you translate English content into Spanish, you must also translate the alt text into Spanish.
     

Adding Alt Text to Images

Follow these steps to add alt text to an image in Energy.gov:

  1. Add a media block to the page.
  2. Add the image in one of two ways:
    • If the image has not been uploaded to Energy.gov, upload the image from your computer.
    • If the image has already been uploaded, find the image in the Media Library.
  3. You must add alt text before you can save the image. Put it in the "Alt Text" field.
  4. If an image has already been added to the page, you can edit the alt text by right-clicking on the pencil icon and selecting "Configure" from the menu.
    • To override alt text for an image, check the box next to "Display Override Text Fields" and scroll down to the "Alt Text Override" text box. Enter the alt text you want to appear for the image, and then click "Update."


Back to top
 

Writing Captions to Complement Alt Text

If you want to add information that would benefit both sighted visitors and visitors using screen readers, put it in the caption.

Captions shouldn't duplicate the alt text. The alt text and caption should supplement each other, with the alt text written for screen readers and the captions written for all visitors.
 

How to Write Alt Text for Different Kinds of Images

Some images require different styles of alt text.