• Resolved wpdp

    (@wpdp)


    Hello,

    I need to get rid of the alt-tag / have an empty alt-tag because of government accessibility regulations.

    I tried to empty the var alt_flags = ""||{}; in the flags.js but the alt-tag didnt change. I also tried it in the gtranslate.php file, but had no success.

    Furthermore, I hope you can help me.

    Best regards,
    Alexandra

Viewing 1 replies (of 1 total)
  • Plugin Author edo888

    (@edo888)

    Hi,

    I doubt it is a government accessibility regulation related issue, since per HTML standard alt tags are required for img elements.

    However, if you want to get rid of them, you can do it via javascript. Something like this should do it:

    document.querySelectorAll('img[alt]').forEach(function(el){el.removeAttribute('alt');});

    If you want to set them to be blank you can do it similarly:

    document.querySelectorAll('img[alt]').forEach(function(el){el.setAttribute('alt', '');});

    You need to run it after document load.

    Thanks! ??

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.