NOTE: The current preferred location for bug reports is the GitHub issue tracker.
Bug 1017 - Lack of <title> element should cause a warning, not an error message
Lack of <title> element should cause a warning, not an error message
Status: NEW
Product: Validator.nu
Classification: Unclassified
Component: General
HEAD
All All
: P2 normal
Assigned To: Nobody
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-01-16 10:27 CET by Jukka K. Korpela
Modified: 2015-01-16 10:27 CET (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jukka K. Korpela 2015-01-16 10:27:53 CET
Currently the lack of <title> causes the message “Element head is missing a required instance of child element title.” However, even the explanation after the message says that it is not required “if the document is an iframe srcdoc document or if title information is available from a higher-level protocol”.

The HTML5 specification explicitly says, at the end of the description of the <head> element: “The title element is a required child in most situations, but when a higher-level protocol provides title information, e.g. in the Subject line of an e-mail when HTML is used as an e-mail authoring format, the title element can be omitted.”

The message should thus be changed to a warning, e.g. “Element head lacks a child element title.” It would be more informative to say e.g. “The document lacks a title element”, but since the message is issued after switching from <head> to <body>, it is probably better to keep the text as referring to the <head> element content.

It may be argued that making this just a warning will make authors regard <title> as generally optional. This is a real risk, but in my opinion more acceptable than issuing an error message about something that is not necessarily an error.