Skip Navigation

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

Problem:
The client needed to add alternative text to flag icons for SEO purposes. They were able to add alt text to SVG icons using the Optimole plugin but encountered issues when trying to add alt text to custom flags uploaded through WPML, as WPML only allows uploading flags from computer files.
Solution:
We informed the client that it is not possible to add alt text to custom flags through the media folder in WPML. However, alt text for flags should automatically be activated when the language switcher is set to display only flags, without the language name. We provided a link to the documentation on how to add a custom flag:
https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/custom-language-flags/#how-to-add-a-custom-flag
Additionally, we referenced a forum post that might help with the issue:
https://wpml.org/forums/topic/accessibility-issues/#post-15063367

If this solution does not apply to your case, or if it is outdated, we recommend opening a new support ticket. We also highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. For further assistance, please contact us in 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.

This topic contains 1 replies, has 2 voices.

Last updated by Bruno Kos 1 year ago.

Assisted by: Bruno Kos.

Author Posts
April 25, 2024 at 11:02 am #15565037

marioL-27

My developer told me this regarding the website: hidden link

_______

Hi, The problem is that to improve the SEO of the site I need to add alternative text for the flag icons. Using the Optimole plugin, I did this for downloaded svg icons on the site hidden link in the media folder. But when loading a custom flag into WPML, I can only load from computer files hidden link.
Is there any solution for this? Is it possible to change the custom flag through the media folder?

April 25, 2024 at 11:20 am #15565076

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

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

Here is the ticket, let know if you have any questions.

April 26, 2024 at 2:02 pm #15570960

marioL-27

It seems like it's best for accessibility to not add alt texts to flags.