Skip Navigation

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

Problem:
The client's site audit indicated that the flags of the WPML language switcher do not have image alt attributes.

Solution:
If you're experiencing an issue where your WPML language switcher flags are missing alt attributes, we recommend checking out our errata page on this topic: Missing ALT tag for flag image in a language switcher.

Before applying any changes, please ensure you take a full backup of your site.

As an alternative solution, you can configure a language switcher to display flags only, which will automatically include the ALT attribute for the images.

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 1 reply, has 2 voices.

Last updated by Waqas Bin Hasan 6 months ago.

Assisted by: Waqas Bin Hasan.

Author Posts
November 16, 2023 at 1:13 am #14821445

louisN-4

we did a site audit

hidden link

and one of the comments is that the flags of wpml language changer, don't have Image Alt Attributes

can you please either tell me how to add it, OR make sure in your next versions you add to the flags IMG ALT attributes for example "Flag of XXXXX, Change Language"

hidden link
2 hidden link
3 hidden link
4 hidden link

November 16, 2023 at 9:06 am #14823321

Waqas Bin Hasan
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting the support.

Please see this errata https://wpml.org/errata/missing-alt-tag-for-flag-image-in-a-language-switcher/ for details and you can apply the workaround as needed.

Remember to take full backup before proceeding!!

Alternatively, you can also consider to configure a language switcher with flags only, in that way it will display the ALT.

Regards.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.