alert-circle An exclamation point inside of a circle. alert-triangle An exclamation point inside of a triangle shape. arrow-down-left An arrow pointing down and to the left. arrow-down-right An arrow pointing down and to the right. arrow-down An arrow pointing down. arrow-left An arrow pointing left. arrow-right-thick A thick arrow pointing right arrow-right An arrow pointing right. arrow-up-left An arrow pointing up and to the left. arrow-up-right-thick A thick arrow pointing up and to the right arrow-up-right An arrow pointing up and to the right. arrow-up-thick A thick arrow pointing up arrow-up An arrow pointing up. award A award bell A bell. calendar A calendar icon. camera-off A camera that is deactivated. camera A camera. check-circle A checkmark in a circle. checkmark A checkmark. chevron-down A chevron arrow pointing down. chevron-up A chevron arrow pointing up. chevron A chevron arrow pointing down. chevron A chevron arrow pointing down. chrome Chrome browser logo. close-circle An x in a circle. close A x shape. door A car door. edge Edge browser logo. ellipses An ellipses shape. engine A car engine. envelope A closed envelope. explorer Internet explorer logo. eye-off An eye that is deactivated. eye An eye. facebook Facebook logo. file-text A piece of paper with lines on it. file A blank piece of paper. firefox Firefox browser logo icon-flame A flame. fwd A car drivetrain. gear A gear with multiple teeth. grid A 2x2 grid. heart An empty heart. height-width Arrows indicating height and width measurement. home A home icon. info THe letter i in a circle. instagram Instagram logo. link A chain link. linkedin Linkedin logo. map-marker A map marker pin. maximize Four corners containing a plus sign. menu Three lines signifying a menu. message-circle A speech bubble. minus A minus dash. mpg A car dashboard gauge. opera Opera browser logo. pause A pause symbol. pencil A pencil. phone A phone handset. pinteest-disc Pinterest logo in a disc. pinterest Pinterest logo. play A play button. plus A plus symbol. safari Safari browser logo. search A magnifying glass. seat A car seat. shield A shield sliders A group of control sliders. square A square with rounded corners star A star. tag A shopping tag. thumbs-down A hand with the thumb pointing down. thumbs-up A hand with the thumb pointing up. trash A trash can. trophy A trophy. truck A truck icon. twitter Twitter logo. user-circle An outline of a person in a circle. user An outline of a person. video A video camera. youtube Youtube logo. zoom-in A magnifying glass with a plus in the center
Spark logo Spark Design System
Accessibility

Image alt text

Images have text alternatives that describe the image or the function of the image

Back to the a11y checklist

Why it matters

Text alternatives (“alt text”) is the text equivalent for an image. You don’t see the alt text on a web page, it is in the page markup within the alt attribute of the img element. Providing alt text allows the information to be rendered in a variety of ways by a variety of user agents. For example:

  • A person who cannot see an image can have the text alternative read aloud by a screen reader.
  • A person who cannot hear an audio file can have the text alternative displayed so that he or she can read it.
  • Text alternatives are displayed in place of the image in browsers if the image file is not loaded or when users disable images.
  • Text alternatives provide better image context/descriptions to search engine crawlers, helping them to index an image properly. For example, proper alt text helps Google display the correct images in the SERP based on a particular query.

Images that should include alt in the markup:

  • Informative images. They convey information useful for understanding the page content. Some examples are an image within an article, the hero image on the Make Model Year (MMY) page.
  • Functional images. They initiate actions and convey information useful for interacting with the page content. They are used in interactive elements like a “Save” icon/button, the Cars.com logo, an image in a carousel or an Ad image that links off to another page.
  • Decorative images. They don’t convey any meaning or important information (and aren’t links or buttons). In this case, there is no need to write an alt text but they should have a null alt alt="". This is a standardised indication to screen reader software that the image is decorative and can be safely ignored.

See exceptions.

WCAG 2.0 reference: 1.1.1Non-text Content

Example 1

Informative image. The alt text for this image needs to describe the image as concisely as possible.

Red Tesla Model 3 driving along sunset

Don't

<img src="bird.png" alt="Red car">

Do

<img src="bird.png" alt="Red Tesla Model 3 driving along sunset">

Example 2

Functional image Search button. The alt text for this image should convey the action that will be initiated rather than a description of the image.

Search

Don't

<img src="bird.png" alt="magnifying glass">

Do

<img src="bird.png" alt="Search">

Example 3

Decorative images with a null alt text alt="". Make sure that there is no space character between the quotes and no line breaks.

Example of a decorative image

<img alt="">

And in the case of a background image

<img src="/images/background.png" alt="" />

How to check for this

  1. Check if alt is missing. Automated
  2. Check that decorative images have an alt="". Manual
  3. To check if alt text is appropriate: for each image, judge in context if the alt text adequately conveys the information in the image it is next to by referring to the guidelines provided. Manual

Collaborators

  • Cars.com News section: Production team (Saoirse O’Malley)
  • Cars.com Shopping/SRP/VDP: imagery is coming from Dealers and third party-sites. It is unknown who is responsible for adding alt text to these images.
  • Content authors

Resources