Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

348
Visualizações
How to add accessibility icon to screen reader like JAWS, Voice over and Talkback?

I get an assignment that want me to update the privacy page content. there is a heart icon on one of the key values in the content json file. this needs to be read by all the screen reader applications like JAWS, Voice over and talk back

this is how I approach the problem.

I added span to the json file span <span class="sr-only">heart</span>

And then added class in the to the css :

.sr-only {
    position:absolute;
    left:-10000px;
    top:auto;
    width:1px;
    height:1px;
    overflow:hidden;
}

expected Behaviour Icon should be read by screen reader like JAWS, Voice over and Talkback

Actual behaviour it is only read by NVDA

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

The heart icon usually means you want to mark an item a "favorite". You don't have to literally use text that describes the shape of the icon. Instead, you should use text that describes the purpose of the icon. In this case, something like "mark as favorite".

Most heart icons are also interactive. You can click on them with a mouse and it changes the heart icon from an empty/outline shape to a filled shape. The icon must be keyboard focusable (using the tab key) and selectable (space or enter). That's typically done by making the icon a real <button>.

If you use the <button> element with a nested <img> for the icon, then specify an alt attribute for the <img> that says "mark as favorite". You'd have something like this:

<button>
   <img src="heart.jpg" alt="mark as favorite">
</button>

To be complete, you'd probably have a different image when the heart is selected so you'd want the alt text to indicate that selecting the heart again will clear the item as a favorite.

<button>
   <img src="filledheart.jpg" alt="clear as favorite">
</button>

A second solution is to use aria-pressed to have a toggle button. You'd toggle the attribute value between true/false (and toggle the icon between empty and filled).

A third solution is to make the heart a checkbox. The heart is essentially checked or unchecked (filled or empty) so a checkbox/switch fits the paradigm.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda