Plugin Author
edo888
(@edo888)
Hi,
I have tried to reproduce the issue on my end, but I still see the tooltips with or without SG Optimizer Defer Render-Blocking JS option. Please configure your website, so tooltips are not visible and let me know to check.
GTranslate already has rules to exclude it’s scripts from SG Optimizer, so no action is needed.
Thanks! 🙂
Hi @edo888,
Strange! In any case, you can check our website now (tooltips not displaying).
This is our current back end set up for each language: https://prnt.sc/NtRnps1jhVJ-
Thank you!
Plugin Author
edo888
(@edo888)
I have checked your staging2 website and I see the tooltips for each language when I hover the mouse to select a language. Please provide a link if it is not the correct website to check.
Thanks! 🙂
Hi @edo888,
Yes, tooltips appear on our staging website because we’re delaying the execution of the /base.js
file. Not on our live website.
We prefer not to delay the /base.js
file because doing so breaks on occasion the display of language codes in the language dropdown depending on the speed you’re navigate through our website. Further, once you select another language, it will not load until the user interacts with the screen. This delay or condition yields a less desirable user experience.
To access our live website, remove “staging2” from our staging site URL.
From our testing and observation it appears that /jquery.min.js
(a render-blocking file) needs to load before /base.js
in order for the tooltips to work. Strange because the flags are loading just fine.
Thank you!
Plugin Author
edo888
(@edo888)
Hi,
OK, I see the issue on the live website. You have the following javascript, which is changing the title attribute to aria-label.
function hide_title_attributes(){
var t = document.querySelectorAll('Tooltip Disappears When SGO Defer Render-Blocking JS is Enabled | V3.0.1');
if(t && t.length > 0){
for(var n=0;n<t.length;++n){
var title=t[n].title;
t[n].removeAttribute('title');
t[n].setAttribute('aria-label',title);
}}}
hide_title_attributes();
Depending on the order of execution of the scripts it works as intended or it doesn’t.
This has nothing to do with GTranslate.
Thanks! 🙂