gc-da11yn / gc-da11yn.github.io

Digital Accessibility Toolkit - Boîte à outils d'accessibilité numérique
https://a11y.canada.ca/en/
MIT License
31 stars 33 forks source link

[CHANGE] Alt text character limit #655

Open shawnthompson opened 1 week ago

shawnthompson commented 1 week ago

What page is the change request for? Please supply the URI.

No response

Approval needed?

None

Yes, please send a request to the following person?

No response

Who shall do the work?

Timeline

No response

Additional context

We received an email in our generic inbox:

I just went through the Digital Accessibility Toolkit and came across a page which has information that seems confusing to me.

On this page – Alternative text and long description – Best practices - Digital Accessibility Toolkit there are two statements that contradict each other and I will like to get a clear understanding on what the required alt text character limit should be.

Under the header “Meaningful alt text”, there is a statement that says alt text should be 125 characters maximum.

Meanwhile

Under the header “Tips for writing long descriptions”, there is a statement that says if you can describe the content and function of an image in less than 140 characters, use alternative text instead.

shawnthompson commented 1 week ago

This is what I replied with a link to this issue:

Although the Web Content Accessibility Guidelines (WCAG) do not specify a character limit for alt text on web pages. Instead, they focus on the principle that alt text should be "equivalent" and "meaningful" to convey the content and function of the image.

Here are a few key considerations for writing alt text according to WCAG:

  1. Conciseness: While there's no strict character limit, shorter alt text is generally preferred—typically around 125 characters or fewer. This is because many screen readers, like JAWS or NVDA, may truncate alt text after about 125 characters, depending on the software and settings.
  2. Relevance: The alt text should accurately describe the content or purpose of the image. It should provide enough detail to convey what is important about the image but avoid unnecessary information.
  3. Context: The description should take into account the context in which the image appears. If the surrounding text provides context, the alt text can be shorter.
  4. Complex Images: For complex images like charts or infographics, where a short description may not be sufficient, you can include a more detailed description elsewhere (e.g., in the surrounding text or a separate long description page) and provide a shorter alt text that indicates the presence of a longer description.

To summarize, WCAG focuses on the quality and relevance of alt text rather than enforcing a character limit. Keeping alt text concise and context-appropriate ensures a better user experience for screen reader users.

shawnthompson commented 1 week ago

Maybe we should be adding the why we are suggesting a character limit.