Forum Academy Marketplace Showcase Pricing Features

Feature Request - Alt Tags Setting On Image Backgrounds

ALT tags can be set on all other images except for image backgrounds.

Any chance we can get it included as an option when an image background is set?

1 Like

If an image is being used as a background, then surely the container element is the ALT tag that would be accessible to the pointer?

I’m not quite following this…

There is a setting for the image background somewhere that I’m missing?

Yes, but the background image is a styling attribute is it not? it is on a parent element, e.g. a group or a text or wherever you are using it, so the ALT text would have to be relative to the parent and not the actual image.

It would be maybe worth setting a background image on an element, then look at the page source and see how it is defined in the dom.

Yes that’s correct it’s a styling attribute of a group.

But the group itself doesn’t have an ALT tag feature and typically these are attributed to images only to tell search engines what the image is about. A group would I guess be like a DIV tag in standard HTML which to the best of my knowledge don’t have ALT attributes that are set-able.

When you use the image element it allows you to set the alt tag. But not when you use an image as a background (another image element of a sort).

What you’re asking doesn’t make sense: alt tags are applied to img elements, and if you use the background image feature, this is in the CSS, not in the HTML.

See this https://www.w3schools.com/tags/att_alt.asp

If ALT tags are critical to you, use an image element.

Yeah I’m sending data to the group that contains the background image is the issue so i can’t change it to an image.

I see what you’re saying, but somewhere there’s an image being called from the server and displaying some how on the page inside the group.

Doesn’t this also use an img html vs. a css setting to call the image and thus could have an ALT tag?

No, as it is simple a css attribute it sets a parameter, there is no associated alt parameter to write anything to. it is probably written using the styling parameter background-image: url(“an_image_url.gif”); or the like. That is why i suggested looking at the page source to see how the background image was implemented.

2 Likes

Interesting.

For whatever reason my SEO tool picks it up as an image missing an ALT attribute.

Thanks all.