Background of the issue:
I am trying to make the website pass the European Accessibility Act using the Avada theme with a sticky menu header. This issue only happens when WPML is activated. I have reached out to Avada's support, and they suggested contacting you. Here's a short video demonstrating it: hidden link. Link to a page where the issue can be seen: hidden link
Symptoms:
When WPML is enabled, the main menu ID appears twice in the HTML from the start, causing duplicate menu IDs. When WPML is disabled, the main menu ID is only once in the HTML when the page initially loads, and it appears twice when you scroll down.
Questions:
Why does WPML cause duplicate menu IDs in the HTML?
How can I prevent WPML from duplicating menu IDs?
Reference to our recent chat, I'm still working on it and also need to investigate in more detail (i.e. reproducing in a local environment to see if it can be reproduced out of the box).
I need some time to further investigate the issue, however, please note that I'll be off tomorrow for a local holiday and 'll be able to check back on Wednesday and 'll update you accordingly.
I'm trying to reproduce the issue in a fresh sandbox site at hidden link (one-click login). Here I've installed Avada theme and related plugins and am trying to add that sticky header to the global layout. But unfortunately I can't find "Element Sticky Visibility" (see attached) options in Menu element.
Perhaps I'm missing something in the setup.
Can you please take a few minutes to reproduce the issue in this sandbox site? It'd be great that either you record the screen or write the exact steps that how did you reproduce it. So I can then retry and check further.
Hi Waqas,
I've reproduced the issue now on the test side.
I've set it up more or less as on my own site:
The container is set to sticky (not the menu or column) and absolute.
The container has no background color. Once sticky, it has a background color.
Container has a min-height:100px, when turning sticky it changes to 50px - This seemed to be crucial, as nothing happened until i changed this setting.
I also added a WPML language switcher to the menu, but not sure if this is necessary.
I checked again in the sandbox and noticed that the "menu-primary" ID is still duplicated even without WPML plugins active (see attached). As you can also see that there's no language switcher visible because WPML isn't active.
This is little confusing, because the result is same with our without WPML and I'm not sure if it is really caused by WPML.
Do you have any other thoughts or how we can confirm if WPML is really causing such side-effect?
Hi Waqas,
yes i can see that as well.
That's very strange. On my website the problem is not there when WPML is disabled,
Honestly I've believed it was a bug from the theme from the start, and I wrote to Avada support first. I've only contacted you as well because they told me to. They're apparently still investigating it...
But it is strange that the behavior on my website is different once WPML is enabled.
However, once you start scrolling on my website, with WPML off, the ID appears twice in the html. Just not initially when loading the page, that's the big difference really.
Sure, let's wait for them to complete their assessment and provide some technical pointers, which we can check again with WPML. And then I can check with my team.
Sure, please feel free to reply when there's more to it, thank you.
The topic ‘[Closed] WPML causes duplicate menu ID's in HTML’ 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.