• Resolved jordanwebdev

    (@jordanwebdev)


    Hello, I’m using the image lazy loading feature, which automatically replaces images with an img that has a data string as the src. The problem is that these images don’t have alt tags, so web accessibility tools like https://achecker.ca mark them as problematic when they’re used in link tags.

    Check 7: Image used as anchor is missing valid Alt text.

    I know that once the image loads in, the alt tag displays like normal, so it’s not really an issue. However, it would be nice to add an alt tag for those loading-in images, just so that those errors don’t appear on accessibility checker tools. Would it be possible to add even just a generic alt tag like “image is loading in…”? Is there any way I can hook into a filter to add this now, rather than wait for an update?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    There is only one <img tag, which indeed has a src and a data-src attribute with JS overwriting the placholder in src with the value of data-src. Now in this process AO does not add/ remove/ change the alt-tag, so either it is there or it is not (and you need to add it). If you do have an alt-tag, these might just be false positives?

    Thread Starter jordanwebdev

    (@jordanwebdev)

    Yes, you’re right. My apologies, I thought I added the alt tag, but I was looking at the wrong image. There is no issue now, thank you for your help. I think the page checker may also have been viewing a cached version of my site before, which could have added to the confusion. It’s all fine now.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    no worries, happy all is OK! ??

    enjoy your May 1st!
    frank

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Missing alt tag for lazy-loading images’ is closed to new replies.