CMS Development

MattOnce
Contributor

Empty alt text for blog image removes alt attribute in code

SOLVE

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 Accepted solution
dennisedson
Solution
HubSpot Product Team
HubSpot Product Team

Empty alt text for blog image removes alt attribute in code

SOLVE

@MattOnce 

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

View solution in original post

5 Replies 5
randalesko
Participant

Empty alt text for blog image removes alt attribute in code

SOLVE

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 Upvotes
MattOnce
Contributor

Empty alt text for blog image removes alt attribute in code

SOLVE

You're welcome!

0 Upvotes
dennisedson
Solution
HubSpot Product Team
HubSpot Product Team

Empty alt text for blog image removes alt attribute in code

SOLVE

@MattOnce 

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

georgeluc
Participant

Empty alt text for blog image removes alt attribute in code

SOLVE

Is there an update to this? 

0 Upvotes
MattOnce
Contributor

Empty alt text for blog image removes alt attribute in code

SOLVE

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 Upvotes