Project

General

Profile

Actions

Bug #53305

closed

Epic #61834: Create future proof Content Element with strong default

Task #61836: Reorganize Content Element properties within backend Extension

Task #61842: Refactor CSS-Styled-Content + Content Elements

HTML5 rendering of headers works only if a date is set

Added by Wolfgang Wagner over 10 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Content Rendering
Target version:
-
Start date:
2013-11-04
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:

Description

The HTML5 rendering of a header works only, if I set a date in the content element (see attached screenshot).

I think, the reason is the typoscript of lib.stdheader in CSC:

lib.stdheader {
.
.
.

stdWrap {
        dataWrap = <div class="csc-header csc-header-n{cObj:parentRecordNumber}">|</div>
        dataWrap {
            override = <header class="csc-header csc-header-n{cObj:parentRecordNumber}">|</header>
            override {
                if {
                    isTrue {
                        field = date
                    }
                    value = html5
                    equals.data = TSFE:config|config|doctype
                }
            }
        }
    }

}

Why is there isTrue.field = date?

Version: TYPO3 6.2-dev, latest from Git


Files

2013-11-04_12-17-48.png (42.2 KB) 2013-11-04_12-17-48.png Wolfgang Wagner, 2013-11-04 12:28

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #47575: header element is rendered in lib.stdheader for all casesClosedPatrick Broens2013-04-25

Actions
Actions #1

Updated by Mathias Brodala over 10 years ago

Wolfgang Wagner wrote:

The HTML5 rendering of a header works only, if I set a date in the content element (see attached screenshot).
Why is there isTrue.field = date?

See issue #47575, grouping a single headline does not make sense, so at least the date needs to be set.

Actions #2

Updated by Oliver Hader over 10 years ago

  • Complexity set to easy

Thanks for pointing out the date issue which is just a trigger that further information (like the date) is rendered within that header block.
From my perspective, that does not make much sense, but however was to main intention of the referenced change #47575 - so, I'd expect to use HTML5 tags if it is requested.

Actions #3

Updated by Oliver Hader over 10 years ago

  • Category set to Frontend
Actions #4

Updated by Wolfgang Wagner over 10 years ago

Mathias Brodala wrote:

See issue #47575, grouping a single headline does not make sense, so at least the date needs to be set.

Grouping is not necessary on a single headline, that's true, but it would be nice if the header-element would be rendered ;)

Actions #5

Updated by Mathias Brodala over 10 years ago

Wolfgang Wagner wrote:

Grouping is not necessary on a single headline, that's true, but it would be nice if the header-element would be rendered ;)

The decision wrt default behavior is up to the TYPO3 devs, but you can always delete that isTrue condition in you TS if you need to have the <header> element rendered at all time.

Actions #6

Updated by Wolfgang Wagner over 10 years ago

Mathias Brodala wrote:

The decision wrt default behavior is up to the TYPO3 devs, but you can always delete that isTrue condition in you TS if you need to have the <header> element rendered at all time.

Yes, I've done this. But I don't understand the relationship between a hx element and a date.

Actions #7

Updated by Patrick Broens over 10 years ago

Wolfgang Wagner wrote:

Yes, I've done this. But I don't understand the relationship between a hx element and a date.

According to the W3C specs the <header> tag should be used for the following:

The header element represents introductory content for its nearest ancestor sectioning content or sectioning root element. A header typically contains a group of introductory or navigational aids. When the nearest ancestor sectioning content or sectioning root element is the body element, then it applies to the whole page. A header element is intended to usually contain the section's heading (an h1–h6 element), but this is not required. The header element can also be used to wrap a section's table of contents, a search form, or any relevant logos.

In short, this is a grouping element. The date can be seen as an introductory aid. That's why it is put in header tag, when there is a hx element also. We are grouping the hx and the date by a header tag. Putting only the date in a header tag breaks the specification. You're not grouping anything, only displaying the date. Not using a hx tag, but wrapping a date with header breaks the semantics of the document also.

Since you're not grouping anything when there is only the date (same as in #47575), I would like to close this issue. The <header> tag is a grouping tag, not for a single element, and especially not combined with a hx tag (although not required). By changing this, CSC would not be according to the W3C specs anymore.

Of course, you can always change this according to your personal taste, but be aware of the right markup and semantics. The specification can be read in many ways, but I believe the way we use it currently is the best. You're always welcome to change it for your own needs ;-)

Actions #8

Updated by Patrick Broens over 10 years ago

  • Category changed from Frontend to Content Rendering
Actions #9

Updated by Felix Kopp over 9 years ago

  • Parent task set to #61842
Actions #10

Updated by Frank Nägler over 9 years ago

I agree to Patrick and would prefer to close this issue.

Actions #11

Updated by Riccardo De Contardi almost 9 years ago

  • Status changed from New to Closed
Actions #12

Updated by Sebastian Schmal over 8 years ago

the problem is in the 6.2.15 :(
plz fix the bug, thanks!

Actions

Also available in: Atom PDF