Viewing 7 replies - 1 through 7 (of 7 total)
  • Unfortunately it is not as simple as that as the title is used elsewhere. I will look into this issue for the next major release.

    Thread Starter Shashank Shekhar

    (@shashankitsoft)

    There is no ‘title’ attribute rendered inside img attributes by default, so I hv just changed some code in the plugin and replaced ‘longdesc’ with ‘title’, worked at my place.
    But as you saying may be it used for some purpose, so data-attributes, rel or some other parameter may be used…
    Lets see what u gonna include in next release.. ??

    Is your lightbox working?

    Anyways, title is important for accessibility so I would prefer another method.

    HTML5 has made longdesc obsolete and trying to replace it with title tag, is useless as the title tag does not help people with visual disabilities… and that is the purpose of a longdesc.

    To replace longdesc in html5 you should instead use the combination of explicit links, figure captions, and the attribute aria-describedby.

    Thread Starter Shashank Shekhar

    (@shashankitsoft)

    Thanks for the hint and help Viraladmin, it was knowledgefull, me and plugin author both didn’t know about the best replacement for ‘longdesc’.
    But I don’t think that the author used longdesc earlier keeping the people with visual disabilities in mind. He just made it that time what he liked too, but now its the concern of w3c validation.
    I am waiting for the author to take the right step and make all right!

    —-
    Further, just for more help, could you please put some example html code how it can be done with the right attribute without much changing the current code and achieve validation without breaking functionality?

    The most likely candidate is the use of html5 custom data attribute:

    https://www.w3.org/html/wg/drafts/html/master/dom.html#embedding-custom-non-visible-data-with-the-data-attributes

    I am in the middle of a project right now so I won’t have a chance to try it out for a while. You could give it a shot by replacing all occurrences of “longdesc” with something like “data-wpif2”

    Version 1.8.0 has now been released and fixes this issue.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘HTML5 Validation invalid: longdesc attribute on img element’ is closed to new replies.