• Resolved generosus

    (@generosus)


    Good Day,

    When we run webpagetest.org, we’re getting an Accessibility error message attributed to your plugin. The message is:

    Fix any of the following: Document has multiple static elements with the same id attribute: google_translate_element2<div id=”google_translate_element2″></div>

    Upon inspecting the backend code of your plugin, it appears the message is caused by this code entry.

    Kindly review and advise. How can we fix this?

    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author edo888

    (@edo888)

    Hi,

    It looks like you have more than one language selector on your website.

    Thanks! ??

    Thread Starter generosus

    (@generosus)

    Hi @edo888,

    Thanks for the quick reply.

    We are only using your plugin. Only one language selector.

    If we missed something, please clarify further or provide a fix.

    It appears we are not the only ones reporting this issue with your plugin.

    Thank you.

    PS: Please do not close this topic as Resolved when it actually isn’t. Thank you.

    Plugin Author edo888

    (@edo888)

    Maybe you do not realize that you have more than one, the second one can be hidden. The message says that you have more than one.

    I am not able to see your website to find it for you, but you can check the HTML DOM and search for google_translate_element2. Sometimes your theme can create a hidden menu derived from your menu and show it for narrow/mobile screens.

    Thanks! ??

    Thread Starter generosus

    (@generosus)

    Ah, great lead. Thank you. Is there a filter available for disabling your plugin on mobile devices? (versus using the CSS variable “display = none!important;”)

    Plugin Author edo888

    (@edo888)

    If you are having issues with positioning the selector, then you better use Show floating language selector option, which looks good for mobiles as well as desktop screens and it should appear only once.

    It depends what you call a mobile device.

    You can define a logic to detect mobiles with PHP and hide the selector, but you won’t be able to use caching, otherwise logic will not always work.

    You can also implement some logic to hide the selector or to remove it completely using javascript on client side, this will work with caching, since it works on client side.

    You can also use @media query with CSS to hide the selector based on screen resolution, if you only care about screen sizes, and caching will be possible.

    It really depends on your specific case and the complexity of logic you want to use.

    Thanks! ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘GTranslate Error Message’ is closed to new replies.