User tests: Successful: Unsuccessful:
When the page header is not shown, and the article title is shown, we have a h2
tag, instead of h1
. This PR checks if the h1 tag is already there, if so, the article title will have the h2 tag. If the page header is hidden, the h1
tag is displayed.
Category | ⇒ | Front End Components |
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
I have tested this item
Ok with Protostar.
I have tested this item
- Install staging with testing datas.
h2 {
font-size: 22px;
line-height: 24px;
}
h1 {
font-size: 26px;
line-height: 28px;
}
I would suggest not to merge this PR at all in Joomla 3 because the described problem with different CSS rules for H1, H2 and so on will affect too many sites and templates.
It's a break of backwards compatibility from my point of view not just because of CSS rules.
Joomla works like this since Joomla 1.5 and many people rely on that bahavior and have built up their site markup accordingly. Article title is H2. That's why I start with H3 in editors. All these sites will get problems with this PR that changes headline markup and just sometimes.
Other sites have their brand as H1 and never show menu/page titles. H2 for the article title is correct then. We don't know it...
In my opinion, we should look ahead. On the one hand we have b/c, but on the other hand we should improve SEO. How it is possible that a default Joomla! template does not have the h1
header? It is not correct at all! I think, Joomla! has already undergone more complicated changes than CSS rules.
You have to consider not just the default template but the millions of
sites not using the default template. I know that on at least some of my
sites this change would result in two h1 tags which is worse for seo
The default configuration might not turn on a <h1>
header by default but Joomla most assuredly ships with and supports the use of <h1>
tags. And I do agree with the comments here on B/C; any site that is currently deployed and using the core layout would have its heading structure affected by this change, for better or worse. The size difference IMO isn't a good argument against this; that's the whole point of <h1>
versus <h2>
.
How it is possible that a default Joomla! template does not have the h1 header?
You committed a PR for the Joomla core but not a template override for the Protostar template.
You committed a PR for the Joomla core but not a template override for the Protostar template
Thank you, I did not know! ;) That because it is usually fixed in paid templates.
How is it possible, that Joomla! does not have h1
in the core?
Why h2
? They are totally useless without h1
.
The current default configuration is not suitable for SEO.
I am conflicted on this PR. In theory it is good and correct and an improvement. But it will cause issues on existing sites that have the H1 on the site created in a different way - perhaps a header module for example - and this would end up with two H1 tags which is also not good.
It could be done as a template override for the protostar template BUT we really should not be creating overrides for the default template.
So I just dont know. I think it might just have to be a mistake from the past that is not fixable without breaking existing sites
this will end in too much pain for us for something that can be fixed from someone who noticed that here is a problem. We should make sure that this will not happen again in Joomla4.
+1 on closing
+1 on closing too.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-09-02 12:08:45 |
Closed_By | ⇒ | rdeutz |
Multiple H1 tags is not considered bad SEO practice according to Matt Cutts from Google:
https://www.youtube.com/watch?v=GIn5qJKU8VM
This is especially true with the advent of HTML5. There are a lot of detailed articles about this if you search up "html5 multiple h1". Here's one that concisely talks about how it used to be and how it is now with multiple h1's: http://www.greenlaneseo.com/blog/2015/02/seo-101-seo-and-multiple-h1-tags/
Now days it is much better to have 2 h1's than to not have one at all.
I agree with this. There's no problem with multiple h1's but there is a problem with not having one. I honestly think we should reconsider this
For 4.0 maybe. As long as the policy is not making major HTML changes to one's site during a release series, this shouldn't be merged to 3.x at all. SEO arguments or not. And yes it is a major change to someone's site. For those using core layouts, their article titles will most likely change in appearance (and I know a lot of templates have subtle differences between H1 and H2 beyond size).
There should only be one h1 tag. There can be multiple h2 tags etc. Plus on
the site I'm currently working on this will completely break the layout as
the h1 css is 4em and the h2 is only 1.2em and finally there is jquery
targeting the h1 tag
On 6 Oct 2016 10:12 p.m., "Michael Babker" notifications@github.com wrote:
For 4.0 maybe. As long as the policy is not making major HTML changes to
one's site during a release series, this shouldn't be merged to 3.x at all.
SEO arguments or not. And yes it is a major change to someone's site. For
those using core layouts, their article titles will most likely change in
appearance (and I know a lot of templates have subtle differences between
H1 and H2 beyond size).—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#11772 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8ZK2OvCKf1t-rI-6WHNWfTSUkqnoks5qxWQ1gaJpZM4Jr85_
.
@brianteeman you are just revealing the problem! h1, h2...h6 are just some elements and it's really hurting me watching all these fancy template clubs doing styling directly to the elements AND NOT into a specific class. I mean is like styling a div and expecting that this will just work. Very annoying also the point that javascript is not targeting a class or an id. I hope you didn't pay a lot for that template...
There should only be one h1 tag.
I personally prefer having only a single H1 tag, but it is not bad for SEO. It's also W3C compliant as of 2014. Having two H1 tags is a lot better than none from an SEO stand point. I understand the styling issue Brain mentioned. So for the sake of making everyone happy, article titles should use H1 in Joomla 4.0. This way template developers/users would not be surprised and we would have better markup.
Could someone here please provide a reliable link/source/statement saying that a missing H1 is a negative SEO issue. As long as a page has a TITLE tag I don't see that a H1 is needed at all for better SEO.
This article shows that pages without an h1 have worse SEO ranking: https://www.searchenginejournal.com/in-2014-how-important-is-an-h1-tag-for-seo/
It is not a negative issue, but it makes SEO worse. So, indirectly, it is a negative SEO issue.
The Importance of an h1 Tag: The h1 is the most important tag and it should never be skipped on a page. Search spiders pay attention to the words used in the h1 tag as it should contain a basic description of the page content, just as the page title does.
You can cite whatever you want. As long as you do not cite Google this proves nothing. We have a changed situation now. Not just one h1 ist allowed on a page but several h1. So which one is the magical SEO pushing one? The one that a user has set consciously or the one that Joomla sets in the background SOMETIMES just because there is no h1 for an ARTICLE headline (!= the page headline). And sometimes not....
I would prefer a consistent pages structure without h1 but h2 > h3 > h4... instead of a mixed up chaotic one, with sometimes h1 > h3 (gaps) sometimes not.
Cite from one of your links
if your site is introduced with an h1 tag followed by an h3 tag, the hierarchy will be broken, meaning the heading structure is not as SEO-friendly
TITLE tags are used by search engines (in part) to determine a page’s topic
This PR makes it better for some and worse for others who used other solutions for years.
Pure counterproductive Google mania...
SEO isn't just about google ;)
Officially from Bing.com:
h1 tag – helps users understand the content of a page more clearly when properly used
Wilson brings up a good point; we need to be concerned with more than just Google. While Google is fine with multiple h1 tags, Bing has a different opinion on this subject:
Only one H1 tag per page
As a result I'll support the idea that multiple h1 tags should be avoided. Plain vanilla JavaScript can easily find existing H1 tags if they exist to avoid duplicates and strange template issues.
var h1Tag = document.getElementsByTagName('h1');
if(h1Tag==null && h1TagOption==true){
document.write('h1' + title + '/h1');
}
else {
document.write('h2' + title + '/h2');
}
(removed HTML arrows due to GitHub attempting to parse them in code block)
Due to concerns of jumping from h1 to h3 I suppose the best course of action is to create a boolean option to display an h1 tag (default could be false which would display an h2). Hence why my above condition has "h1TagOption" in the if statement.
I think this should be a job of an template override but not in core. All these settings (show page title and so on) are too individual from site to site.
E.g.
In editors my headlines start with H3 relying on that article title is always H2 not H1.
I also think that this would be a B\C break.