? Pending

User tests: Successful: Unsuccessful:

avatar philip-sorokin
philip-sorokin
24 Aug 2016

Summary of Changes

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.

avatar joomla-cms-bot joomla-cms-bot - change - 24 Aug 2016
Category Front End Components
avatar addondev addondev - open - 24 Aug 2016
avatar addondev addondev - change - 24 Aug 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 24 Aug 2016
Labels Added: ?
avatar bertmert
bertmert - comment - 25 Aug 2016

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.

avatar 1apweb 1apweb - test_item - 25 Aug 2016 - Tested successfully
avatar 1apweb
1apweb - comment - 25 Aug 2016

I have tested this item successfully on bf066b0

Ok with Protostar.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11772.

avatar bertmert bertmert - test_item - 25 Aug 2016 - Tested unsuccessfully
avatar bertmert
bertmert - comment - 25 Aug 2016

I have tested this item ? unsuccessfully on bf066b0

- Install staging with testing datas.

  • Open front-end with Protostar template.
  • Headline "Joomla! Testing" is H2 with CSS rules:
h2 {
 font-size: 22px;
 line-height: 24px;
}
  • Apply patch
  • Headline "Joomla! Testing" is H1 with CSS rules
h1 {
 font-size: 26px;
 line-height: 28px;
}

=> Unexpected larger headline than before patch


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11772.

avatar bertmert
bertmert - comment - 25 Aug 2016

Before patch

25-08-_2016_15-46-37

After patch

25-08-_2016_15-45-53

avatar addondev
addondev - comment - 25 Aug 2016

@bertmert
It is predictable. The h1 header is larger than the h2. Would you suggest changing CSS rules?

avatar bertmert
bertmert - comment - 25 Aug 2016

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...

avatar addondev
addondev - comment - 25 Aug 2016

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.

avatar brianteeman
brianteeman - comment - 25 Aug 2016

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

avatar mbabker
mbabker - comment - 25 Aug 2016

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>.

avatar bertmert
bertmert - comment - 26 Aug 2016

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.

avatar addondev
addondev - comment - 26 Aug 2016

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.

avatar brianteeman
brianteeman - comment - 1 Sep 2016

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

avatar rdeutz
rdeutz - comment - 1 Sep 2016

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

avatar jeckodevelopment
jeckodevelopment - comment - 2 Sep 2016

+1 on closing too.

avatar rdeutz rdeutz - change - 2 Sep 2016
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2016-09-02 12:08:45
Closed_By rdeutz
avatar rdeutz rdeutz - close - 2 Sep 2016
avatar rdeutz rdeutz - close - 2 Sep 2016
avatar JoshuaLewis
JoshuaLewis - comment - 21 Sep 2016

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.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11772.

avatar wilsonge
wilsonge - comment - 6 Oct 2016

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

avatar mbabker
mbabker - comment - 6 Oct 2016

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).

avatar brianteeman
brianteeman - comment - 6 Oct 2016

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_
.

avatar dgt41
dgt41 - comment - 7 Oct 2016

@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...

avatar JoshuaLewis
JoshuaLewis - comment - 7 Oct 2016

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.

avatar bertmert
bertmert - comment - 7 Oct 2016

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.

avatar philip-sorokin
philip-sorokin - comment - 7 Oct 2016

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.

avatar JoshuaLewis
JoshuaLewis - comment - 29 Nov 2016

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.

avatar bertmert
bertmert - comment - 30 Nov 2016

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...

avatar wilsonge
wilsonge - comment - 30 Nov 2016

SEO isn't just about google ;)

avatar JoshuaLewis
JoshuaLewis - comment - 30 Nov 2016

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.

Add a Comment

Login with GitHub to post a comment