Writing effective alt text can be more challenging than you might expect. Think of it like this: if you imagine your beautiful site and take away all of the images, how would you describe them so that your visitors can still understand what they are looking at?
Here are some of the best practices for writing effective alt text:
While alt text helps SEO, it should not be used for keyword stuffing. It should provide details of what the image is showing and help describe it to a visitor who may not be able to see it.
Be specific! If your image shows a headshot of your company's CEO then you should be descriptive about who they are. This helps both SEO and visitors with disabilities understand exactly who or what is being shown in the image.
A good rule to follow is "describe the image's subject and its context".
Find a way to relate the image to the context of the section, subpage, or entire site that you are presenting. This helps visitors understand what purpose it serves in relation to the content you have written.
Alt text should be a maximum of 125 characters. For visitors who use assistive technology such as screen-readers, it's important to keep these descriptions concise. Some screen-readers will stop reading past this point.
Avoid saying "Picture of..." or "Image of...". Screen-reader technology identifies the type of media for its users already.
Check for spelling errors.