Tagged: , ,

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1371290
    #1371315

    Hey Tim,

    Thanks for contacting us!

    SVG elements does not have an ALT attribute – https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute. Could you use Title or Desc tags inside SVG element instead?

    Best regards,
    Yigit

    #1371320

    but if you like to force : open that svg file before uploading with a (good) text editor and insert on the svg tag yourself an alt attribute.

    if you like to have on the a tag ( this is not an attribute allowed for a-tag ) a title or alt:
    ( see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a )

    function custom_logo_attriubtes(){
    ?>
    <script>
    (function($){
      $('.logo > a').attr({ title:"here comes a new title Attribute", alt:"Your new Alt Attribute" });
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'custom_logo_attriubtes');
    #1371670

    Ah ok, thanks for the info, much appreciated.

    #1371673

    Hi,

    Thanks for your help @Guenni007! :)

    Let us know if you have any other questions and enjoy the rest of your day, Tim!

    Best regards,
    Yigit

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘SVG logo alt text request’ is closed to new replies.