Codeinwp / neve

A fast, lightweight, AMP ready WordPress theme built with speed and usability in mind.
https://themeisle.com/themes/neve/
GNU General Public License v2.0
262 stars 84 forks source link

Usage of duplicate id values in nav menu #4256

Closed jankohoener closed 1 month ago

jankohoener commented 3 months ago

Description

Using Neve without any plugins enabled on our staging site adds to the HTML tree of the nav menu duplicate id values, once for the desktop view and once for the mobile view. An example is id="secondary-menu" if used both on desktop and mobile view. This leads to errors by the W3C Validator and potential downgrade of SEO. It's also semantically incorrect to use the same id for two elements. And it may lead to problems with CSS, where the same selector is applied both on desktop and mobile view. The id's should either be changed into a class or they should be renamed.

Step-by-step reproduction instructions

  1. Create Wordpress site with Neve.
  2. Add a header element to both desktop and mobile view (for example a secondary menu)
  3. Save
  4. The HTML source will contain duplicate id values (e.g. secondary-menu)

(example of a staging site with Neve only, no plugins, is at https://www.maxsel.de/technicalseo/)

Screenshots, screen recording, code snippet or Help Scout ticket

No response

Environment info

https://pastebin.com/Hw1e9caF

Is the issue you are reporting a regression

No

selul commented 3 months ago

hi @jankohoener,

Thanks for reporting, we will look into it.

pirate-bot commented 2 months ago

:tada: This issue has been resolved in version 3.8.10 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

jankohoener commented 2 months ago

The duplicate id _secondarymenu is indeed gone from our site. However, other navigation elements that are used on both desktop and mobile still have duplicate id's for example text, nav menu, custom HTML.

vytisbulkevicius commented 1 month ago

Hi @jankohoener,

I'm trying to replicate the issue, just to confirm - are you getting duplicate values on header or footer? I checked your website and I don't see duplicate ids in the header, well I see for the secondary menu but maybe you haven't updated the theme yet? I don't see it for other elements.

I see it in the footer, though, can you share with me a screenshot from Customizer of how your footer is built? I will also create a new issue since this one was already released and for secondary menu it was fixed. Thanks!

vytisbulkevicius commented 1 month ago

@jankohoener,

I'm closing this issue but feel free to reply or create a new one if you can still replicate the issue you mentioned. Thanks!