CMS Development

MattOnce
Colaborador(a)

Empty alt text for blog image removes alt attribute in code

resolver

I am trying to give an image an empty alt attribute (alt=""). But when editing an image in a blog post and leaving the alternative text field empty, Hubspot removes the "alt" attribute from the code completely, instead of giving it an empty value.

 

An empty alt attribute is needed for accessibility, and used by screen readers to know when an image is purely decorative, rather than one that requires description/ alternate text.

 

I could just use code view to add alt="" where needed, but what can I offer my content creators who are less familiar with html source code?

1 Solução aceita
dennisedson
Solução
Equipe de Produto da HubSpot
Equipe de Produto da HubSpot

Empty alt text for blog image removes alt attribute in code

resolver

@MattOnce 

Thanks for submitting this!  We have created an issue for this internally! 

Exibir solução no post original

5 Respostas 5
randalesko
Participante

Empty alt text for blog image removes alt attribute in code

resolver

Hey, is there any update? I use bunch of decorative images in each of our post. What to do? Let it blank of write ""? 

0 Avaliação positiva
MattOnce
Colaborador(a)

Empty alt text for blog image removes alt attribute in code

resolver

You're welcome!

0 Avaliação positiva
dennisedson
Solução
Equipe de Produto da HubSpot
Equipe de Produto da HubSpot

Empty alt text for blog image removes alt attribute in code

resolver

@MattOnce 

Thanks for submitting this!  We have created an issue for this internally! 

georgeluc
Participante

Empty alt text for blog image removes alt attribute in code

resolver

Is there an update to this? 

0 Avaliação positiva
MattOnce
Colaborador(a)

Empty alt text for blog image removes alt attribute in code

resolver

Hi georgeluc, as it happens I noticed this the other day: 
Screenshot 2023-01-03 at 09.04.26.png

But as far as I can tell with some quick testing, it still does not register empty as alt="", it just reverts to the filename without a content to override it.

0 Avaliação positiva