Alt Text in Sites Component | Community
Skip to main content
Level 2
October 11, 2024
Solved

Alt Text in Sites Component

  • October 11, 2024
  • 2 replies
  • 515 views

Hi All,

 

When alt text is input and/or inherited to a component, does the component do some kind of transformation to make the text readable? In other words, is there a process making alt text readable to screen readers or is it innately readable?

 

Would appreciate guidance on this, thank you!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by martin_ecx_io

Screen readers are looking for specific attributes on your html elements - for images the "alt" attribute contains what the screen reader will say to describe the image, eg:

 

<img src="dog.jpg" alt="Dog with a bell attached to its collar.">

 

you should ensure alt text is only added to images which add meaning to the page as screen readers will read this out to the end user - this is why for "decorative" images it is valid to have a blank alt text - this indicates the image can be ignored when reading the content of the page to the user.

 

There is some info about how and when to use alt text here: https://www.w3.org/WAI/tutorials/images/decision-tree/

 

 

2 replies

martin_ecx_io
Community Advisor and Adobe Champion
martin_ecx_ioCommunity Advisor and Adobe ChampionAccepted solution
Community Advisor and Adobe Champion
October 11, 2024

Screen readers are looking for specific attributes on your html elements - for images the "alt" attribute contains what the screen reader will say to describe the image, eg:

 

<img src="dog.jpg" alt="Dog with a bell attached to its collar.">

 

you should ensure alt text is only added to images which add meaning to the page as screen readers will read this out to the end user - this is why for "decorative" images it is valid to have a blank alt text - this indicates the image can be ignored when reading the content of the page to the user.

 

There is some info about how and when to use alt text here: https://www.w3.org/WAI/tutorials/images/decision-tree/

 

 

Shashi_Mulugu
Community Advisor
Community Advisor
October 11, 2024

@shaylabl can you give us more details.. like AEM version, what is the component name in this context,  is it OOTB core components or custom?

 

As @martin_ecx_io said it depends on how html is generated finally..