Home › Forums › WoodMart support forum › Accessibility issue with “WPML Languages” widget in the header builder
Accessibility issue with “WPML Languages” widget in the header builder
- This topic has 18 replies, 3 voices, and was last updated 1 week, 3 days ago by
Artem Temos.
-
AuthorPosts
-
March 1, 2025 at 2:55 pm #642013
eliv3nParticipantWhen scanning trough https://pagespeed.web.dev/ you will find the accessibility issue both in Mobile and Desktop in the “WPML Languages” widget which is in the Woodmart header builder.
Accessibility issue:
Image elements have [alt] attributes that are redundant text.
This issue is happening when you show the FLAG icon in the language switcher, because the ALT for the flag will be exactly same text as the Title “English” which is showing duplication and that’s why the error is showing.Suggestion:
The ideal is to change the ALT from English to English Language, or to EN or anything rather than the text to prevent the duplication.I appreciate if you can create a patch for this issue, or alternatively, provide me with an Snippet to solve this matter.
Please note that I currently removed the FLAG icon in my website so the accessibility issue is disappeared. it will appear again if I add the Flag icon into the language switcher.
-
This topic was modified 1 week, 6 days ago by
Artem Temos.
March 3, 2025 at 3:22 pm #642360
Luke NielsenKeymasterHello,
The thing is that the flag icons come from WPML, so please check how it works with some default WordPress themes like WooCommerce Storefront to understand if it is our theme issue or not.
Kind Regards
March 4, 2025 at 6:38 pm #642759
eliv3nParticipantHello Luke, Thank you for your responds.
I have taken a deep look into this issue and also I have contacted WPML support and we try to remediate this issue with WPML, after week of trying we findout this issue is within the theme not WPML.
Here is the link to WPML support ticket (https://wpml.org/forums/topic/error-in-alt-attributes-when-scanning-the-website-via-pagespeed-web-dev/#post-16736784)To make it clear, WPML also have a language switcher widget which works smoothly on Woodmart, however, the “WPML Languages” widget inside the Header Builder is being handled by Woodmart theme and it’s not being controlled by WPML itself.
March 5, 2025 at 3:23 pm #643044
eliv3nParticipantHello Luke,
Any updates on the issue raised?
March 5, 2025 at 4:10 pm #643074
Luke NielsenKeymasterHello,
You can change it on your website by copying the function
woodmart_get_wpml_languages_in_mobile_menu
from the parent theme, which is located ininc/integrations/wpml.php
on line 255 and adding the child theme to function.php and modernizing it there as you need (you can just remove the alt text as now in the WPML menu).Kind Regards
-
This reply was modified 1 week, 3 days ago by
Artem Temos.
March 5, 2025 at 6:01 pm #643152
eliv3nParticipantHello Luke,
I came across your explanation on this forum thread regarding the accessibility issue with the WPML language switcher.
https://xtemos.com/forums/topic/accessibility-issue-with-wpml-language-switcher-in-mobile-menu/However, I do not have a child theme activated. Instead, I am using the Code Snippets plugin. Would you be able to provide a snippet that I can apply to fix this issue?
Additionally, this error occurs on both mobile and desktop.
Thank you in advance for your help!
March 6, 2025 at 10:39 am #643309
Luke NielsenKeymasterHello,
The thing is the same, just copy
woodmart_get_wpml_languages_in_mobile_menu
function to the code snippets and remove the alt text, you can send me access to the admin panel so I can show on ho to do it.Thank you for your time.
Kind Regards
March 12, 2025 at 11:25 pm #645354
eliv3nParticipantHello Luke,
I sincerely apologize for repeatedly asking you the same question. Would you be able to help me by writing a snippet? I recently purchased a new license and renewed my support, so I would greatly appreciate your assistance in crafting this snippet for me. Thank you!
March 13, 2025 at 10:32 am #645446
Artem TemosKeymasterHello,
We will change this
alt
text in our next theme update.Kind Regards
March 14, 2025 at 10:07 pm #646044
eliv3nParticipantMarch 16, 2025 at 7:28 pm #646220
eliv3nParticipantJust following up on this matter.
March 17, 2025 at 10:40 am #646310
Artem TemosKeymasterHello,
It will be included in our
8.1.2
version.Kind Regards
March 20, 2025 at 11:22 pm #647718
eliv3nParticipantHi Artem,
It’s been three weeks now, and the patch for this small issue has not been issued. Could you please include it in the next patch? I’ve noticed that other users facing similar issues with WPML are getting fixes through patches rather quickly.
Additionally, please remove the domain name from post ID #642013 for privacy reasons.
Thanks for your help!
-
This reply was modified 2 weeks ago by
eliv3n.
March 21, 2025 at 5:28 pm #647976
Artem TemosKeymasterHello,
We will release this update next week. We don’t see your domain anywhere in the first reply. Could you please clarify where we need to remove it?
Kind Regards
March 21, 2025 at 6:13 pm #647996
eliv3nParticipantHi Artem,
Thank you for your help.
It is written on the first line in the post #642013
March 21, 2025 at 6:15 pm #647999
Artem TemosKeymasterOh, right, I didn’t notice that. Deleted.
March 21, 2025 at 10:35 pm #648049
eliv3nParticipantThank you Artem
March 23, 2025 at 10:23 am #648239
eliv3nParticipantHello Artem.
Please remove your screenshot from #643074 post.
it contains the domain name.Thank you.
March 24, 2025 at 10:38 am #648355
Artem TemosKeymasterHello,
Removed. Please let me know if there is anything else I can help you with.
Kind Regards
-
This topic was modified 1 week, 6 days ago by
-
AuthorPosts
- You must be logged in to create new topics. Login / Register