//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.
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
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