Empty alt Attributes in images for accessibility

Hi, is there a way to have empty alt attributes in images?

This is for accessibility purposes. Images that only have a visual value should have an empty alt attribute. That way, screen readers skip the image.

  • If you donā€™t put an alt attribute, then screen readers read out the entire image URL (horrible experience)
  • If you put a space in the alt field, Webflow adds a space, but that would be read by a screen reader too (not skip it.)
  • if you put ā€œā€ ā€¦ then Webflow makes the alt attribute ā€œā€ā€œā€ (lol) Which screen readers will read.

It would be great if there was a checkmark to set the alt as empty.

Thereā€™s a similar post but the answer was not great.
The person helping didnā€™t understand why the need for an empty tag:


Here is my site Read-Only: LINK
(how to share your site Read-Only link)

5 Likes

Hey @pablostanley thank you so much for sharing this! Iā€™m looking into this feature to see what we can do as far as a product update to allow that capability. There may be an existing way to do this already, Iā€™m checking with the team and will follow up asap :bowing_man: thank you for helping to make Webflow sites more accessible :webflow_heart:

2 Likes

What if we default to alt="" if it isnā€™t set?

The disadvantage would be if there were semantic information in the image title. (Webflow adds id information to the file name, reducing that default utility.)

I think images that are part of the design can be background on divs and usually people do that. When the image is a part from the content you can use the image element / Images on background donā€™t have alt.

Maybe Iā€™m wrong :blush: If yes tell me why :smile: so I can learn

Piter

Right. The question is if we should default to alt="" for those image elements, so that screen readers donā€™t read out ā€œ5b2906cdb10d95c8453693d4_my-image.jpgā€ aloud. That is what they do with a default Webflow image element now.

I understand, but if you have an image that is part from the content you will probably add alt description. If the image is not part from the content you can use div with a background. Why adding an image that is part from the content and not adding alt description.

Sorry if I donā€™t get the idea right :sweat_smile:

There isnā€™t a way to add an empty string now alt="", which is the correct thing to do withā€¦

Weā€™re thinking about defaulting images to alt="", instead of leaving the attribute out when not set. I think this improves the default experience for site visitors with screen readers.

Iā€™m wondering if there is any disadvantage that we havenā€™t considered with this default.

2 Likes

Iā€™m trying to think of what the disadvantages of this could be, but nothing comes to mind.
Personally, I think this would be a good default. Itā€™s up to designers to add description to their images but if they forget to do so, then people who use screen readers will suffer.

Anyway. My opinion is :+1:t4:

Thank you so much for being on top of this <3

1 Like

Thanks Pablo!

The fix is live now :rocket: img tags now default to a blank alt attribute.

Hope it helps!

7 Likes

I think this is not working anymore. The empt alt copy is not showing up as default neither for decorative images. Could you please fix it again?