Tell us what you are trying to do?
Hi! I'm trying to translate some Astra theme strings. I have a woocommerce and I need to translate the shopping cart icon aria-label "View Shopping Cart, x items" and the screen-reader-class "Main Menu".
The View Shopping Cart... doesn't appear, no matter what I try. "Main menu" is already translate on wpml string translation, but still in english in front-end.
Is there a similar example that we can see?
No, sorry
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
Hello,
The strings that you already translated very likely are not the actual strings that you are trying to translate.
The issue with this approach might be that those those HTML attributes are not coded in a way inside Astra, that would allow the registration of the strings for translations.
If I check for this string in Astra, it looks like this:
\astra\inc\compatibility\woocommerce\class-astra-woocommerce.php on line 3355:
As you can see in the above example, the span element with the class "screen-reader-text" is using hard-coded HTML and this is not translatable.
I also find another example for the string "Main Menu" which is translatable and registered and translated on your site, but this seems not to be the string that you are looking for.
It is located inside astra\inc\template-parts.php line 173:
Now, this last example is coded correctly, but it looks to me as if this is not the string that you are looking for. You seem to look for the string from the prior example, which is hard-coded HTML and not translatable in the way it is coded.
This means, that to make those strings translatable, the Astra Team would need to adapt their code.
I suggest you first reach out to Astra Support about this matter, please feel free to share my findings and ask if they would consider looking into this, running some tests, and making those HTML attributes translatable.
Take note, that this is not WPML specific - you would run into the same issue with any translation plugin.
If any further assistance from our side will be needed, please let me know.
Best regards
Andreas
The topic ‘[Closed] Accessibility problems: aria-label and screen-reader’ is closed to new replies.
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.