• Resolved sandy1969

    (@sandy1969)


    Hi there,
    I’m working on a website which has to pass Web Content Accessibility Guidelines AA,
    i am using the simple dropdown version of the plugin, navigation using the “arrow” keys and “enter” key works flawless in chrome, however in Firefox it doesn’t you are able to navigate with the “arrow” keys but hitting “enter” doesn’t change the language.
    Could you please have a look?

    Thanks in advance,
    Sandy

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

    (@edo888)

    Hi,

    Please post your website address, so I can check it for you.

    Thanks! ??

    Thread Starter sandy1969

    (@sandy1969)

    Plugin Author edo888

    (@edo888)

    Hi,

    Indeed, there is a difference in the browser implementation of the pointerenter event. Currently Firefox doesn’t fire it during keyboard navigation, while Chrome does.

    We have the following code in wp-content/plugins/gtranslate/js/dropdown.js file:

    if(current_lang != default_language)
        load_tlib();
    else
        document.querySelectorAll(u_class).forEach(function(e){e.addEventListener('pointerenter',load_tlib)});

    You can try to change it to:

    if(current_lang != default_language)
        load_tlib();
    else
        document.querySelectorAll(u_class).forEach(function(e){
            e.addEventListener('pointerenter',load_tlib);
            e.addEventListener('focus',load_tlib);
        });

    Please note that future updates to GTranslate plugin will revert the changes, so you have to manually apply the change with every update. I’ll try to research this topic more and come up with a bug fix, so you do not have to do it every time.

    Alternatively you can use our paid version which doesn’t depend on external js libraries: https://gtranslate.io/#pricing

    Thanks! ??

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