page-title-present

Page has a non-empty title

automaticWCAG 2.4.2 (A)confidence: highseverity: seriousoperable

Checks that the page includes a non-empty <title> element.

Applies to. Applies to a run over a whole document. A run narrowed by contextSelector, or by engineOptions.fragment, is notApplicable: whether the page has a title is not a property any subtree can answer.

Expectation. The document has a <title> element, and document.title with whitespace collapsed is non-empty. The element is looked for anywhere in the document, not only inside <head>: a <title> the parser leaves outside <head> is still the document title in every browser. Whether that title describes the page is page-title-patterns' question.

Examples

pass
<html>
<head><title>Quarterly report</title></head>
<body>Hi</body>
</html>

The document has a non-empty `<title>`.

fail
<html>
<head></head>
<body>Hi</body>
</html>

No `<title>` element anywhere in the document.

View source