? Failure

User tests: Successful: Unsuccessful:

avatar sergeytolkachyov
sergeytolkachyov
19 Aug 2020

Actual result BEFORE applying this Pull Request

  1. It was so that the category title was wrapped always in span tags. It doesn't matter if the subtitle was specified or not.
  2. If there is no page heading from menu item category title is still output in h2 tag. So page can be without h1 tag

Expected result AFTER applying this Pull Request

  1. Now, if the subtitle is not specified, only the text of the title in the tag is output.
  2. If there is no page heading from menu item category title outputs in h1 tag

Documentation Changes Required

  • replaced spaces to tabs
  • remove excessive condition in subheading if
avatar sergeytolkachyov sergeytolkachyov - open - 19 Aug 2020
avatar sergeytolkachyov sergeytolkachyov - change - 19 Aug 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 19 Aug 2020
Category Front End com_content
avatar brianteeman
brianteeman - comment - 19 Aug 2020

This PR really should be just part of your own web site template overrides. Amongst many reasons is that this change would have to be made to every view

avatar ReLater
ReLater - comment - 19 Aug 2020

... and it's a grave B\C break.

avatar sergeytolkachyov
sergeytolkachyov - comment - 20 Aug 2020

This PR really should be just part of your own web site template overrides. Amongst many reasons is that this change would have to be made to every view

Why not do it? I can. What's the other reasons?

avatar sergeytolkachyov
sergeytolkachyov - comment - 20 Aug 2020

So the same situation in Joomla 4: very many pages could be without h1 tag, For example, news site. It has 30-40 categories +/- wich titles I get in h2 tag, In each category there is several tens (or hundreds) of thousands of articles wich titles I get in h2 tag. But h1 tag I can get only from menu item. But I don't want to display heading from menu item on all of thousands pages. Because I should have another heading hierarchy. So, if I want correct hierarchy - I must do override. It very nice that Joomla get me this possibility, but it could be a good CMS core property - to display correct pages from an SEO perspective.

Moreover, not only news sites are based on the content component. It is also used for stores and catalogs, where the correct hierarchy of titles is as important as in content sites.
I specifically looked: this header output code has been running since Joomla 1.6.0-since 2011. And the same code remains unchanged even in Joomla 4.

avatar brianteeman
brianteeman - comment - 20 Aug 2020

The h1 tag could also come from the template itself (such as the site name) as it does on many sites. As a result if your change was applied on those sites you would end up with two h1 tags which is also wrong. Finally as I stated before for this change to be accepted then it would have to be applied to all views and not just this one.

avatar sergeytolkachyov
sergeytolkachyov - comment - 20 Aug 2020

The h1 tag could also come from the template itself (such as the site name) as it does on many sites. As a result if your change was applied on those sites you would end up with two h1 tags which is also wrong. Finally as I stated before for this change to be accepted then it would have to be applied to all views and not just this one.

If the template has an override, the main file will not be used and two h1 tags will not occur. Similarly, a lot of sites are very wise not to use the site name in the h1 tag, because the site name appears on every page of the site, while the h1 tag must be unique for each of them. If you refer to the HTML5 specification, as well as to many responses from Google in semantic markup, the presence of 2 or more h1 tags is not a violation. Another thing is that few people use semantic markup as intended. But those cases when the page does not have a single H1 tag really cause concerns for the quality of the site and its SEO optimization.

I don't see a problem in making similar changes in other files. If the very logic of this PR gets approved, then changing other files is just a job to do.

avatar brianteeman
brianteeman - comment - 20 Aug 2020

And you don't see a problem in potentially breaking the design of every joomla web site?

avatar sergeytolkachyov
sergeytolkachyov - comment - 20 Aug 2020

And you don't see a problem in potentially breaking the design of every joomla web site?

Ok, that's a reason for Joomla 3 if template not uses override. But what about Joomla 4? There is no live sites on Joomla 4.

avatar chmst
chmst - comment - 23 Aug 2020

@SergeyRyzhov
I have made some refexion on subtitles and meanwhile I think that <span is correct
Subtitles are not headings but an additional information to the headline. For example in a Book, there is a title - and a subtitle to make it more precise, but this is not a part of the structure, just an additional information.
So I would say subtitles are part of the title but have other styling.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30422.
avatar sergeytolkachyov
sergeytolkachyov - comment - 24 Aug 2020

@SergeyRyzhov
I have made some refexion on subtitles and meanwhile I think that <span is correct
Subtitles are not headings but an additional information to the headline. For example in a Book, there is a title - and a subtitle to make it more precise, but this is not a part of the structure, just an additional information.
So I would say subtitles are part of the title but have other styling.

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

Yes, that's right. But if subtitile is not specified title is still in <h2 <span. We need to do DOM less. The second is that subtitle is higher title in code.

avatar Tejashrimajage Tejashrimajage - test_item - 5 Dec 2020 - Tested unsuccessfully
avatar Tejashrimajage
Tejashrimajage - comment - 5 Dec 2020

I have tested this item 🔴 unsuccessfully on 53234bd


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

Add a Comment

Login with GitHub to post a comment