W3C tests on HTML 4.0 Transitional / XHTML 1.0 Transitional / XHTML 1.0 Strict / XHTML 1.1 / HTML 5

Documentation

A document is added with the outcome of the tests for each of the above doctypes. See Pre_testing_W3C.ods.

Outcome

HTML 4.0 Transitional

The only error that showed up during the W3C validation of the testing environment was "_NET-enabling start-tag requires SHORTTAG YES_". TYPO3 outputs some void (single) tags with the ending slash, like

<img />

or

<hr />

For HTML 4.0 Transitional this is not allowed

HTML 5

Remarkably there are some errors in the HTML 5 validation I did not expect.

As described for HTML 4.0 Transitional, browsers don't expect the ending slash for void tags. However, in HTML 5 this is allowed, but not recommended. We need to change this for HTML 4 anyway, so we can do this for HTML 5 as well. In HTML 5, no error will be shown for the void tags.

URL's in HTML 5 are not encoded correctly. The error "_Illegal character in query component_" is thrown in the validator, for instance for image popups, because the square brackets are not encoded. Parts of the URL's need to be encoded using rawurlencode()

There are some obsolete attributes for HTML 5 which are used throughout the core.

One of them is "longdesc" and throws the error "_The longdesc attribute on the img element is obsolete. Use a regular a element to link to the description._". According to this rule, it's either the popup link or a link to a page with a description of the image.

For tables the "bgcolor" attribute is used. This is also an obsolete attribute in HTML 5. It throws however a different warning in XHTML than in HTML 5, which is "_The bgcolor attribute on the table element is obsolete. Use CSS instead._"

And then for the "border" attribute. This one is not obsolete in HTML 5, but it can have only the value 1 or an empty string. The error which is thrown is "The value of the border attribute on the table element must be either 1 or the empty string. To regulate the thickness of table borders, Use CSS instead." If the border attribute is not present, you can still add the border with CSS. The only purpose this attribute has is to define if the table can be used for layout purposes. Who needs that nowadays?

Then two other obsolete attributes: cellspacing and cellpadding. It throws the errors "_The cellspacing attribute on the table element is obsolete. Use CSS instead._" and "_The cellpadding attribute on the table element is obsolete. Use CSS instead._". Ok then, let's get rid of them in HTML 5.

Last but not least of the obsolete attributes in HTML 5 is the summary attribute. The following error appears "_The summary attribute is obsolete. Consider describing the structure of the table in a caption element or in a figure element containing the table; or, simplify the structure of the table so that no description is needed._".

HTML 5 also seems to be very strict on dl, dt and dd constructions. In the page Menu/Sitemap we get the following error "_Element dl is missing a required instance of child element dd._". This one is triggered by the Content Object "Menu of subpages of selected pages including abstracts", where one page does not have an abstract.

XHTML 1.0 Transitional

XHTML 1.0 Transitional is sooo transitional, it does not throw any error on any page. It's very forgiving.

XHTML 1.0 Strict and XHTML 1.1

These two are so close together that in both the same errors were shown.

Two issues here:

A target blank is sometimes added, although the user did not fill or select one. If these are empty, they should not be rendered. However we need the target also in XHTML, because some customers demand these and browsers still take them into account when they are there. The error thrown for this issue is "_there is no attribute "target""

One obsolete attribute is used in XHTML, the border attribute for the table. It throws the error "_there is no attribute "bgcolor"_".

Pre_testing_W3C.ods - Pre testing on W3C before any changes (11.3 KB) Patrick Broens, 2011-07-25 14:49