
Problem/Motivation
In HTML5 each section of a html page may use h1
as the html tag of the section title. Also the page title should use h1
becouse that is the root, the main title of the outline.
Unfortunately
There are currently no known implementations of the outline algorithm in graphical browsers…
so this issue must be postponed until browsers implement this feature.
Read more here:
- http://www.w3.org/html/wg/drafts/html/master/sections.html#outlines
- https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Using_HTML_sections_and_outlines
- http://webdesign.tutsplus.com/articles/the-truth-about-multiple-h1-tags-in-the-html5-era--webdesign-16824
Proposed resolution
Change the html tag to h1
in node.html.twig
{{ title_prefix }}
{% if not page %}
<h2{{ title_attributes }}>
<a href="{{ url }}" rel="bookmark">{{ label }}</a>
</h2>
{% endif %}
{{ title_suffix }}
Remove the "content title" conditional (see below) from page.html.twig:
{% if title %}
<strong class="site-name">
<a href="{{ front_page }}" title="{{ 'Home'|t }}" rel="home">{{ site_name }}</a>
</strong>
{% else %}
Remaining tasks
1. Wait 'till browsers implement document outline.
2. Make the changes suggested in the proposed resolution section above ^^
User interface changes
Moe h1
tags… ;)
API changes
None.
Comments
Comment #1
catchIf this is worth doing, it could be done with bc in a minor release.
Comment #2
thamasComment #3
thamasIt still doesn't seem to be implemented in any browser.
Comment #17
smustgrave CreditAttribution: smustgrave at Mobomo commentedThank you for creating this issue to improve Drupal.
We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.
Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.
Thanks!
Comment #18
thamasI think it should be simply closed as "won't fix".
See eg.:https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/Hea...
Comment #19
smustgrave CreditAttribution: smustgrave at Mobomo commented