Make screen reader read image alt text

1

Hello my question is about accessibility: I'm making the accessibility of a page and in it I have an image with a link, I'm using the jaws screen reader to go through all defined elements.

One of these elements is this image with a link, so when I get to that element (using TAB) the screen reader reads the ALT of that image.

<a href="javascript:;" class=""><img src="imagem-qualquer.jpg" width="54" height="54" alt="Descurtir" title="Descurtir">
 </a>
    
asked by anonymous 12.12.2017 / 15:20

1 answer

2

Jose is using aria-hidden as true , in which case the screen reader will ignore your element! Remove the aria-hidden that the Alt should restart.

  

User agents determine an element's hidden status based on whether it   is rendered, and the rendering is usually controlled by CSS. For   example, an element whose display property is set to none is not   rendered. An element is considered hidden if it, or any of its   ancestors are not rendered or have their aria-hidden attribute value   set to true.

SOURCE: link

Here is a checklist of WebAim that is really cool for you to understand how the screen reader interprets the image and its attributes link

Another thing, consider using the tag it is more semantic and has more attributes. See example. (you do not need to use figcaption, or you can use css to strip it off the screen, but leave it visible to the screen reader)

<figure aria-labelledby="nome-da-img" role="img">
    <img src="nome-da-imagem.jpg" alt="Descrição completa da imagem">
    <figcaption id="nome-da-img">Descrição da imagem</figcaption>
</figure>

Here you can read more about Role, Type and Alt: link

    
12.12.2017 / 17:36