Simple test on articles. Set "Show Page Heading" option to "No". Open an article.
Article should have H1 tag.
Article has H2 tag. So page has H2 tag, but there is no H1 tag.
The most correct behavior should be as follows: if there is no page heading then the item title has H1 tag. If there is a page heading then the item title has H2 tag.
Of course, we can technically have whatever we want, but logically we should have one H1, then as many H2, H3, H4 as make sense. They should be properly nested. There is probably no any SEO issues for not doing it right, but it may cause some accessibility issues for screen readers.
There is a very easy fix for that and I am ready to make a PR. Here you can find the example of override for article view to display the correct headings.
Labels |
Added:
?
|
It sounds bad for me and has already been discussed in the past.
There are too many cases where an automatism like proposed is creating just unforeseeable chaos. And it would be another B\C break.
In this case I am the one saying: "Use your override if you want to" ;-)
Well then we can make it against J4?
Good article about H1 tags. If we do care about a11y then H1 tag should be placed on the page.
Its not about h1 being a good idea. We all agree with that. The issue is can you "automatically" do it.
One method I have seen some components do is to count the current h level and then the next is h+1
What's bad in auto? It's counting only within item layout and only between H1 and H2 tag.
If someone decides, for example, to set the h1 manually on a site, (i.e. via a custom module with a specially designed headline), he needs an extra override to get rid of this automatism.
If someone decides, for example, to set the h1 manually on a site, (i.e. via a custom module with a specially designed headline), he needs an extra override to get rid of this automatism.
But now you need to make an override to get H1 in place when there is no page heading.
Well it's up to you boys and girls. Ping me if you will decide to make a PR for this.
Let's see on clean Joomla installation, without page builders, studio's templates etc. Very often settings is Page heading (from menu item) is only in blog category, but not in article. Why do I have an article page without H1 tag? And why should I make an override core files in template if it should be a nice core feature? It's not difficult for me, but it would be taking care about ordinary joomla users. Not all of them are developers, but they have a right to have a good SEO site.
@sergeytolkachyov
so why not do yuo propose a pull request ?
all pull request is very welcomed
@sergeytolkachyov
so why not do yuo propose a pull request ?
all pull request is very welcomed
Because I am proposing it ;) But first wanted to get some feedback on it. Currently people seems does not support it.
maybe i'm wrong and I cannot guarantee you nothing regarding the pr acceptance
but it's always best to propose a solution via pr (for the j4 branch)
if you already have 1
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-08-01 09:46:00 |
Closed_By | ⇒ | alikon |
I do not have it. I have a solution, but why should I make spare my free time to make a PR that probably won't be accepted? While we will be discussing I will need to merge upstream and make my branch up to date and again this will take some time.
I made this issue to listen for a feedback and at the moment I see that people does not want this improvement in J4. Or this is closed to early. Why not to discuss and then make a PR?
As I said, ping me when you will be ready for this improvement and I will make a PR.
Of course there are many different use cases. Somtimes Templates have an h1 tag in the banner, and so on. But it sounds good for me. A PR would be appreciated :)