Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two H1 tags when Show Site Title is enabled #3984

Closed
stefan-cotitosu opened this issue May 22, 2023 · 6 comments · Fixed by #4183
Closed

Two H1 tags when Show Site Title is enabled #3984

stefan-cotitosu opened this issue May 22, 2023 · 6 comments · Fixed by #4183
Assignees
Labels
bug This label could be used to identify issues that are caused by a defect in the product. released Indicate that an issue has been resolved and released in a particular version of the product. tiny (1h) - This label is used for issues that can be completed in under an hour.

Comments

@stefan-cotitosu
Copy link
Contributor

Description

In the header Logo & Site Identity component, when the Show Site Title is enabled, there are two Heading 1 elements in the page. One is for the Desktop component and one for the Mobile one.

The problem is that this raises a warning when using an SEO plugin.

The only solution I found to this issue is with Neve Pro, to use the second Logo & Site Identity component on mobile devices where Show Site Title will be disabled on Mobile. However, for Neve free, there is no such workaround.

Step-by-step reproduction instructions

  1. Create a new instance with Neve and set the home page to your latest posts
  2. Add the Logo & Site Identity component
  3. Set a site title
  4. Enable the following option

enable-show-site-title

  1. Open the site on the front end, and Inspect Element; search for <h1 you will see there are two occurrences

two-h1-neve

Screenshots, screen recording, code snippet or Help Scout ticket

Reported here: https://secure.helpscout.net/conversation/2245485216/369844/

Environment info

https://pastebin.com/f6gRcuTw

Is the issue you are reporting a regression

No

@stefan-cotitosu stefan-cotitosu added the bug This label could be used to identify issues that are caused by a defect in the product. label May 22, 2023
@HardeepAsrani
Copy link
Member

@ineagu In this case, it's fine to use an H2 or something else for the Mobile title? Or Google won't like the hidden H1?

@ineagu
Copy link

ineagu commented May 23, 2023

Hey!

As a user, I would say I don't care that much about it on our sites.

As for how to approach the issue, I would look into what tool is the one that reports that and what a google lighthouse test is telling us about it. Tools can be faulty as well, nowadays is not really relevant if you have 0 or 5 H1, Google is smart enough to understand more than that, so if Google itself doesn't see this as an SEO issue, we can ignore it as well.

If we wanna improve on this, the solution is not to make one of them an H2, the solution would be to clean up the DOM, and repeat this text only once, since if we assume search engines are stupid, they would see that text twice, which is not what we want.

Even more, I don't think having H1 in the site title is the best practice, for most pages the H1 should be the title of a page or the post, which seems to be the case here; https://demosites.io/web-agency-gb/what-is-the-progressive-web-app-pwa-and-how-it-works/, so I am not sure why in the current issue it is h1, while in the demo is

@stefan-cotitosu
Copy link
Contributor Author

Even more, I don't think having H1 in the site title is the best practice, for most pages the H1 should be the title of a page or the post, which seems to be the case here; https://demosites.io/web-agency-gb/what-is-the-progressive-web-app-pwa-and-how-it-works/, so I am not sure why in the current issue it is h1, while in the demo is

I think this might be there because, with Your latest posts option, there is no H1 on the home page; but I'm not 100% sure if this is why it works like this.

@stefan-cotitosu
Copy link
Contributor Author

@RohanSharma2598
Copy link

@preda-bogdan preda-bogdan added the tiny (1h) - This label is used for issues that can be completed in under an hour. label Jan 8, 2024
@preda-bogdan preda-bogdan linked a pull request Jan 8, 2024 that will close this issue
6 tasks
@pirate-bot
Copy link
Collaborator

🎉 This issue has been resolved in version 3.8.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pirate-bot pirate-bot added the released Indicate that an issue has been resolved and released in a particular version of the product. label Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This label could be used to identify issues that are caused by a defect in the product. released Indicate that an issue has been resolved and released in a particular version of the product. tiny (1h) - This label is used for issues that can be completed in under an hour.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants