Change article title to H1?

1 year 6 months ago #12482 by nodrog
nodrog created the topic: Change article title to H1?
I am rebuilding our local council site using this template as we must comply with WCAG2.1AA and this template is a great start.
Using the Wave accessibility tool I have zero Errors or Alerts on my home page but I am getting 1 Alert when clicking through to view an article which uses the Category Blog component.
The Alert is "Missing First Level Heading (H1)". Although I don't think this is a big problem, my OCD is niggling at me and so I wonder if changing the Article title from H2 to H1 will resolve this Alert?
If it were just a case of tweaking the H2 CSS I would be OK setting an override but as I want to change the template to use <H1> instead I am struggling to find how to tweak this.
Any guidance gratefully received.


Please Log in or Create an account to join the conversation.

1 year 6 months ago #12484 by artur
artur replied the topic: Change article title to H1?

If the warning is related to Category Blog view basically the best way is to enable Page heading title (H1) in menu item options (Page Display -> Page Heading).
So, the Main page title will have an H1 tag and the articles below will have H2 tags.

But then you should take care also of the Single Article view. In this view, you need to change H2 to H1.
To achieve that you need to modify the view: components\com_content\views\article\tmpl\default.php
More details on how to do it in the documentation:!_core

Have a nice day.

Please Log in or Create an account to join the conversation.

Time to create page: 0.216 seconds


ul. Wałowa 10/3, 84-200 Wejherowo, registered in Centralna Ewidencja i Informacja o Działalnosci Gospodarczej
NIP/VATID: PL5882424318

Copyright © 2009-2021 All rights reserved. and this site is not affiliated with or endorsed by The Joomla! Project™. Any products and services provided through this site are not supported or warrantied by The Joomla! Project or Open Source Matters, Inc. Use of the Joomla!® name, symbol, logo and related trademarks is permitted under a limited license granted by Open Source Matters, Inc.