SIA-R114HTML page title is descriptive
Accessibility requirements
This rule tests conformance of the following accessibility requirements:
Description
This rule checks that the first title in an HTML web page describes the topic or purpose of that page.
Applicability
This rule applies to the document title of each html web page, except if one of the following is true:
- The html web page has no document title; or
- The document title contains only whitespace text nodes.
Expectation
- The target element describes the topic or purpose of the overall content of the document.
Assumptions
This rule makes no assumptions.
Accessibility Support
- This rule assumes that browsers only recognize the first
<title>
element if multiple<title>
elements are present in the document (as per HTML specification of the document title).
Background
The <title>
elements of embedded documents, such as those in <iframe>
, <object>
, or <svg>
elements, are not applicable because those are not web pages according to the definition in WCAG.
The HTML specification - The title
element requires documents to only have one <title>
element; and <title>
elements to be children of the <head>
element of a document. However, current HTML specification also describes what should happen in case of multiple titles, and titles outside the <head>
element. Because of this, neither of these validation issues causes a conformance problem for WCAG.
Examples
Passed
This <title>
element describes the content of the document.
<html lang="en">
<head>
<title>Clementine harvesting season</title>
</head>
<body>
<p>
Clementines will be ready to harvest from late October through
February.
</p>
</body>
</html>
This <title>
element, the first of two, describes the content of the document.
<html lang="en">
<head>
<title>Clementine harvesting season</title>
<title>Second title is ignored</title>
</head>
<body>
<p>
Clementines will be ready to harvest from late October through
February.
</p>
</body>
</html>
Failed
This <title>
element does not describe the content of the document.
<html lang="en">
<head>
<title>Apple harvesting season</title>
</head>
<body>
<p>
Clementines will be ready to harvest from late October through
February.
</p>
</body>
</html>
Inapplicable
This <title>
element is empty.
<html lang="en">
<head>
<title></title>
</head>
<body>
<p>
Clementines will be ready to harvest from late October through
February.
</p>
</body>
</html>
```
This [`<title>`][<title>] element is a child of an [`<svg>`][<svg>] element.
```svg
<svg xmlns="http://www.w3.org/2000/svg">
<title>This is a circle</title>
<circle cx="150" cy="75" r="50" fill="green"></circle>
</svg>
Acknowledgments
This document includes material copied from or derived from https://www.w3.org/WAI/standards-guidelines/act/rules/c4a8a4/. Copyright © 2024 W3C® (MIT, ERCIM, Keio, Beihang).