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.