id | name | rule_type | description | accessibility_requirements | input_aspects | authors | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c4a8a4 |
Document title is descriptive |
atomic |
This rule checks that the document title describes the topic or purpose of the document.
|
|
|
|
This rule applies to the first HTML title
element that
- is a descendant of a document element that is an HTML
html
element, and - contains children that are text nodes that are not only whitespace.
The target element describes the topic or purpose of the overall content of the document.
There are no assumptions for this rule.
- This rule assumes that browsers only recognize the first
title
element if multipletitle
elements are present in the document. Testing shows that this in general is the case. Therefore the scope of this rule is limited to only checking the firsttitle
element in a document.
- Understanding Success Criterion 2.4.2: Page titled
- This rule is testing Technique G88: Providing descriptive titles for Web pages
- A prerequisite for this rule is that Technique H25: Providing a title using the title element is used for living up to 2.4.2 Page Titled
The <title>
element describes the content of the document.
<html>
<head>
<title>Clementine harvesting season</title>
</head>
<body>
<p>
Clementines will be ready to harvest from late October through February.
</p>
</body>
</html>
Two <title>
elements where the first one describes the content of the document.
<html>
<head>
<title>Clementine harvesting season</title>
<title>Apple harvesting season</title>
</head>
<body>
<p>
Clementines will be ready to harvest from late October through February.
</p>
</body>
</html>
Even though the descriptive <title>
element is not placed within the <head>
element that is the context the element can be used in according to the HTML specification, the rule still passes, since the browser fixes it, and it doesn't cause any known accessibility issues.
<html>
<head> </head>
<body>
<title>Clementine harvesting season</title>
<p>
Clementines will be ready to harvest from late October through February.
</p>
</body>
</html>
<title>
element with content present in document, and the title is descriptive of the content, even though it does not contain letters or numbers.
<html>
<head>
<title>;)</title>
</head>
<body>
<h1>;)</h1>
<p>
The winking emoticon is commonly used after a light-hearted or sarcastic
remark. It is also a popular IM and e-mail emoticon shortcut.
</p>
</body>
</html>
<title>
is not descriptive of the content of the document.
<html>
<head>
<title>Apple harvesting season</title>
</head>
<body>
<p>
Clementines will be ready to harvest from late October through February.
</p>
</body>
</html>
Even though a correct <title>
element is put in the <head>
of the document, this rule only looks at the first <title>
element.
<html>
<head>
<title>Apple harvesting season</title>
<title>Clementine harvesting season</title>
</head>
<body>
<p>
Clementines will be ready to harvest from late October through February.
</p>
</body>
</html>
<title>
element with content present in document, but it is not descriptive of the content.
<html>
<head>
<title>;)</title>
</head>
<body>
<p>
Clementines will be ready to harvest from late October through February.
</p>
</body>
</html>
No <title>
element present in document.
<html>
<head> </head>
<body>
<p>
Clementines will be ready to harvest from late October through February.
</p>
</body>
</html>
<title>
element present in document, but is empty.
<html>
<head>
<title></title>
</head>
<body>
<p>
Clementines will be ready to harvest from late October through February.
</p>
</body>
</html>
This document has a <title>
element but is inapplicable since the document element is an SVG <svg>
element.
<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>
First <title>
element is empty
<html>
<head>
<title></title>
<title>Clementine harvesting season</title>
</head>
<body>
<p>
Clementines will be ready to harvest from late October through February.
</p>
</body>
</html>
First <title>
element contains only whitespace
<html>
<head>
<title> </title>
<title>Clementine harvesting season</title>
</head>
<body>
<p>
Clementines will be ready to harvest from late October through February.
</p>
</body>
</html>