Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
You are working on a site and trying to make the WPML language switcher accessible. The issues include incorrect Aria tagging and the toggler not being focusable with tabbing, which prevents language selection without a mouse.
Solution:
We have acknowledged the issue with the 'role' attribute not being correctly implemented within the language switcher and have reported it for a potential fix in future versions. Unfortunately, we cannot provide a specific timeline for when this will be addressed as it depends on other priorities. If you're experiencing similar issues, we recommend checking the related known issues and verifying that you have installed the latest versions of themes and plugins.

Please note that this solution might be irrelevant if it's outdated or not applicable to your case. If these steps do not resolve your issue, we highly recommend opening a new support ticket. For further assistance, you can also visit the WPML support forum.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: 

This topic contains 3 replies, has 0 voices.

Last updated by Dražen 1 month, 3 weeks ago.

Assisted by: Dražen.

Author Posts
October 1, 2025 at 7:31 pm #17450152

dritanD

Background of the issue:
I am working on a site under development and trying to ensure the WPML language switcher is accessible. I am using the WPML function do_action('wpml_add_language_selector'); to output the language switcher.

Symptoms:
The WPML language switcher is not AA compliant. It does not use the correct Aria tagging, which flags errors with accessibility checkers. Additionally, the toggler is not focusable with tabbing, preventing language selection without a mouse.

Questions:

October 2, 2025 at 6:05 am #17450536

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks for reporting this to us.

Let me check and consult on this with our developer and I will get back to you.

Regards,
Drazen

October 6, 2025 at 5:36 pm #17461664

dritanD

I found that there are settings for the custom language switcher, and aside from "dropdown" which I was using, there is "click dropdown". Using "click dropdown" made the dropdown language switcher usable by tabbing. So this piece is now fine.

But the accessibility checkers I have been using complain about the use of the 'role' attribute within the language switcher. So I think you may want to still look at that.

Here is what I see with various accessibility checkers, including lighthouse:

[role]s are not contained by their required parent element

<span class="wpml-ls-native" role="menuitem">

October 7, 2025 at 5:44 am #17462267

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

Thank you for getting back to me.

Yes, I’ve already reported this issue and suggested it for a fix in future versions.

I can’t guarantee when it will be implemented, as it depends on other issues and the developers’ priorities.

Best regards,
Drazen