Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[A11Y]: Images MUST have alternate text - Homepage banner image #443

Open
jenstrickland opened this issue Mar 19, 2020 · 0 comments
Open

Comments

@jenstrickland
Copy link

Severity: Critical — Section 508: MUST; WCAG 2.0 (A): MUST

Feedback Framework

- MUST - must be addressed to be WCAG 2.0 AA compliant
! SHOULD - is an accessibility best practice
+ CONSIDER - things to think about to improve inclusive design and accessibility

Description

All images MUST have alternate text to convey their purpose and meaning to screen reader users.

Disabilities Affected

  • Blind
  • Deafblind

Potential fix

Ensure all informative <img> elements have short, descriptive alternate text and all decorative <img> elements have empty alt attributes (e.g. alt="").

<!-- current code -->
<img class="img-fluid rounded mb-4" src="https://voices-of-consent-static-images.s3.amazonaws.com/voc_logo.jpg" alt="">

<!-- potential fix -->
<img class="img-fluid rounded mb-4" src="https://voices-of-consent-static-images.s3.amazonaws.com/voc_logo.jpg" alt="logo of voices of consent">

There are three main ways to add alternate text to an image:

  • Using an alt attribute i.e. <img alt="drawing of a cat" src="...">
  • Using an aria-label i.e. <img aria-label="drawing of a cat" src="...">
  • Using an aria-labelledby attribute i.e. <img arialabelledby="someID" src="...">

Alt Text Writing Tips

When writing alt text, keep in mind that its purpose is to relay information to blind users about the image’s contents and purpose - blind users should be able to get as much information from alt text as a sighted user gets from the image itself. Alt text should give the intent, purpose, and meaning of the image.

When writing alt text, it is helpful to keep the following questions in mind:

  • Why is the non-text content here?
  • What information is it presenting?
  • What purpose does it fulfill?
  • If I could not use the non-text content, what words would I use to convey the same information or function?
  • Be sure that all text contained in the attribute is useful. Words like "chart," "image," "diagram," or image file names tend not to be very useful and thus should not be used in alt text.

Decorative Elements

Provide "null" alt attributes (using alt="") for images which do not provide information or do not require alternative text because the image is described in the page content. Some developers will mistakenly leave off the alt attribute altogether on images which they deem do not need alternatives. This is not helpful to assistive technology users because the assistive technology, such as screen reader, will often read the source attribute (i.e., file name) as the alternative text. To tell assistive technology to ignore an image, use a "blank alternative text" attribute: alt="".

Example:
<img src="line.jpg" alt="" role="presentation">

Success criterion

Every <img> element has alternative text and either role="presentation" or role="none".

Why it matters

Screen readers have no way of translating an image into words that gets read to the user, even if the image only consists of text. As a result, it's necessary for images to have short, descriptive alt text so screen reader users clearly understand the image's contents and purpose.

If you can't see, all types of visual information, such as images, are completely useless unless a digital text alternative is provided so that screen readers can convert that text into either sound or braille. The same is true in varying degrees for people with low vision or color-blindness.

When you do not provide an acceptable alternative that works for their available sensory modalities, such as making an image accessible by providing a digital text description, screen readers cannot convert it into speech or braille to make it available by sound or touch.

WCAG & Section 508 Guidance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant