I’m looking for a way to add alt tags to background images in a dynamic cms collection. I know I can use custom attributes to do this in non dynamic situations, but I can’t seem to find a way to add them to my dynamic collections.
Background images seem to work so much better for so many design aspects but I’m not apposed to using images if I could achieve the same effect. I just don’t know how to do that either.
In the SEO analyzers I’ve used it recognizes them as images without alt tags which it says is hurting my optimization. Is this important or would you recommend just leaving it be?
Use background images when they are just for decoration; use <img> when the image is a part of the content. The on-page content should be all you need for SEO purposes. Don’t try to over-think SEO.