-
-
Notifications
You must be signed in to change notification settings - Fork 212
Active page in menu for newsreader module #7189
Comments
+1 I have noticed that, too. |
Technically, that would be wrong, wouldn't it? @contao/developers |
To reproduce the issue in the Music Academy example website:
|
Well, in Isotope we're actually adding a new page to the breadcrumb with the product name (instead of renaming the active page). See https://github.com/isotope/core/blob/master/system/modules/isotope/library/Isotope/Frontend.php#L596 |
I think Leos question is quite on the mark: Technically, the visitor is indeed on the same instance of PageRegular or PageModel or whatever class it might be. But, consider usability: The only native Contao way to get back to the list is the standard 'back' link, which is way down at the end of the news article, and only functional with activated javascript. So if you accidentally opened an article and want to go back, or for any users without JS, the two options are:
Both don't really make a website look too good in the eyes of the visitor. So I'd plead for usability over technical correctness. |
Small correction: This list module in this issue is actually the news archive module. But that doesn't change a thing. |
Why don't we just add another And while we are talking about this, is it still necessary to render the active menu item with a |
Related to #6336 |
Use |
I see. Nevertheless, I have read some documentation now and most of the tutorials were not using a @kikmedia What do you think? |
Maybe @NinaG can check about the accessibility? |
👍 |
I think one should use an |
Do you literally mean |
Zur Frage wegen der Reader-Seite:Ich finde den Wunsch in diesem Fall sinnvoll, denn es geht nicht darum, was rein technisch basiert, sondern was der Nutzer erwartet. Der Nutzer hat auf einen Teaser-Link von News geklickt und ist auf der Detailseite dieser News gelandet. Dass er technisch immer noch auf derselben Seite ist, ist ihm weder bewusst noch ihm begreiflich zu machen (ist für ihn auch irrelevant). Entsprechend wird er erwarten, dass er bei einem Klick z.B. auf "News" in der Navigation wieder auf der News-Liste landet. Das geht in dem Fall nur, wenn Contao erkennt, dass es zwar dieselbe Seite ist, aber der Nutzer unterschiedliche Funktionalitäten je nach Zustand der Seite sieht. Sowohl Usability als auch Barrierefreiheit sprechen hier imho klar für einen Link der News-Seite, wenn der Reader auf derselben Seite ist. Tatsächlich würde der Nutzer ja auch nicht wieder auf der Detailseite landen, wenn er ihn klickt, sondern eben auf der Listenansicht (wie er es erwartet). Gilt natürlich auch für vergleichbare andere Module, die so einen Effekt haben. Generell zur Frage, ob man das nav_default so umstellen sollte, dass SPAN wieder doch A ist:Ich seh nicht, dass die WCAG 2 plötzlich selbst-referierende Links (Links die auf die Seite zeigen, auf der man bereits ist) für gut befindet. Dazu z.B. das hier: G128: Indicating current location within navigation bars Würden wir nun doch wieder in der Navigation die gerade aktive Seite mit einem Link versehen, wäre dieser Anspruch auf jeden Fall nicht mehr erfüllt. Man würde unerfahrene Nutzer irritieren, weil sie auf einen Link klicken und immer wieder denselben Content sehen, der bereits da ist. Ebenso natürlich Screenreader-Nutzer, Nutzer mit kognitiven Schwierigkeiten, etc. Sprich: Ich bin dafür, weiterhin in der nav_default die gerade aktive Seite mit SPAN oder STRONG zu kennzeichnen um selbst-referenzierende Links zu vermeiden. Im Falle der benannten Ausnahme mit Reader-Modulen auf derselben Seite, sollte Contao das aber erkennen und die Seite als A in der Navigation erhalten, weil es für den Nutzer zwei unterschiedliche Seiten(inhalte) sind. |
💯 für strong |
+1 für die Ausführungen von Nina. |
Bin da ganz bei Nina. |
As far as I understand, Ninas comment alignes perfectly with my initial request, so 👍 |
No, they don't. Nina is suggesting to keep the There is no way to reliably determine whether there are URL parameters that require to render an active link or not. Of course, we could go for the The interesting part would have been changing from But if it is breaking accessibility (is this really the case?), we cannot do it. |
Just a thought but can't we simply check if the URL is pointing to the current page but we are having parameters in Like imagine the following:
We could go this way for ANY parameter IMO, as when the page should not be accessible without the "details" parameter, it wouldn't be included in the navigation anyway (marked "hide in menu"). Am I incorrect on this one? What am I missing? |
👍 but your comparison table does not consider the "hide in menu" option? |
You are missing that not every URL parameter automatically means that the page content is different. What if it e.g. is an affiliate ID such as |
This can't be automated. |
The problem is not limited to auto_item parameters. Therefore the checkbox should rather be "always link in menu". |
There's an ongoing discussion to introduce a This would not solve the issue how Contao can indicate if it's a current page or not but probably the coming recommodation to indicate the current page. |
Well that's right. But a general checkbox would not be the right way. On the listig version on the page you don't want the a-tag, but the span/strong. Even on paginated versions of the listing, you don't want it. As not everybody uses the auto-item parameter, you would have to make a checkbox "guess as trail for auto-item or the optional following URL parameter" and another textfield to define the optional get-parameter for the use without auto item. And I am pretty sure, not every user can cope with that, so it's no good idea. I think Leo is right. There is no good way to do that. |
This could be solved by simply adding another template (e.g.
Actually, if we would decide not to care about such edge cases, this idea would work. |
I agree with that. Especially because that example should be a query parameter anyway ^^ |
Changed in 65029ec then. |
I feel like this is not the final version.
|
What?
It does.
That's true. |
If I create a special reader page for my news (instead of using the same page), I will likely hide it from navigation. In this case, I would not want the link to the real page. Also, that link would generate a 404 error by the news reader module. |
I see. That is a valid point indeed. |
Nope, it is not a valid point. I have just set up a test environment and if a page is hidden from the navigation menu, it will never show a link to the real page, because it is, well, hidden from the navigation menu :) |
lol, you're right, obviously it won't be in the menu then :D |
Since sime time ago it is possible to use the news reader module
The standard template nav_default.html5 uses a
<span>
element for active pages. Back in the days when the reader module was located on an arbitrary subpage, the menu item of the list page would have shown a link, not a<span>
.Nowadays, the menu item is a
<span>
, because technically one is indeed on the list page. Only a single part of the URI signals Contao it should display the appropriate news item. The navigation menu does not care.A lot of people expect to be able to click the menu item to get back to the list view. But it is not clickable. I could of course change the standard template to always use a link, but normally I like it the way it is.
Could you change the behaviour of the navigation module to output links if the user is on the reader module of a news list setup?
The text was updated successfully, but these errors were encountered: