Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1425162

    //Edit

    My SEO app support said ToolTips = not so much.
    But It would be a great benefit if it was possible to add alt text to the icons.

    I’m considering purchasing a second license to keep the design elements similar on a related site of mine.
    Two questions come to mind.
    Is there a way to add alt text to the icon?
    And are ToolTips SEO-friendly since they are really hidden text? The icon will link to a new page.
    Thanks for any feedback.

    L.

    #1425375

    Hey wildturkeyway,

    Thank you for the inquiry.

    There is no option for an alt attribute in an icon element, but you can add it manually with a script. Please edit the Icon, go to the Advanced > Developer Settings panel, then in the Custom CSS Class field, add the class name “av-icon-with-alt-a”. After that, add this code in the functions.php file.

    function av_custom_inline_script()
    {
        wp_add_inline_script( 'jquery', 
            "
        (function($) {
            // add alt text to icon
            $(document).ready(function() {
                var altxt = 'ADD YOUR ALT TEXT HERE';
                $('.av-icon-with-alt-a').attr('alt', altxt);
            }); 
        })(jQuery);
        "
        );
    }
    add_action( 'wp_enqueue_scripts', 'av_custom_inline_script' );
    

    You can replace the alt text by editing this line.

    var altxt = 'ADD YOUR ALT TEXT HERE';
    

    Best regards,
    Ismael

    #1428436

    Please accept my apologies for not responding in a timely manner.

    Your help, and that of the rest of the Kriesi support team is much appreciated.


    Lance

    #1428447

    Hi,

    Thanks for the update, I’m glad that Ismael could help you out. Please let us know if you should need any further help on the topic, or if we can close it.

    Best regards,
    Rikard

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.