Expand my Community achievements bar.

SOLVED

Alt Text in Sites Component

Avatar

Level 2

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!

1 Accepted Solution

Avatar

Correct answer by
Adobe Champion

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/

 

 

View solution in original post

2 Replies

Avatar

Correct answer by
Adobe Champion

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/

 

 

Avatar

Community Advisor

@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..