HTML Validation fail – invalid duplicate element
-
Hi there. Thanks for your great plugin!
One thing though…our page is failing html validation due to the presence of multiple <main> elements. Our main theme/content is the correct holder of the tag and WPSearch seems to be the offender.
According to https://www.w3schools.com/tags/tag_main.asp and https://developer.mozilla.org/en-US/docs/Web/HTML/Element/main, there should only be one use of the <main> tag in a document with the (generally frowned upon) exception that you can have more if the the “hidden” attribute is set on any others. Additionally, according to the official docs, the <main> tag is specifically designated to represent the dominant content of the document which is, of course, not the case with WPSearch’s use.
Besides causing validation to fail, this incorrect duplicated <main> tag could also lead to hard to track down errors.
Can <main> simply be replaced with a <div>?
Kind regards.
The page I need help with: [log in to see the link]
- The topic ‘HTML Validation fail – invalid duplicate element’ is closed to new replies.