id | name | description | success_criterion | test_aspects | authors | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
2779a5 |
HTML Page has a title |
This rule checks that the HTML page has a title
|
|
|
|
The rule applies to any page where the document element is an html
element, and where the page is not embedded in another page.
Note: Pages may be embedded inside other pages through elements such as iframe
and object
elements.
The document element has at least one descendant that is an HTML title
element.
Note: The title
element exists in other namespaces such as SVG. These are not HTML title
elements and should be ignored for this rule.
The first HTML title
element that is a descendant of the document element has children that are text nodes that are not only whitespace.
There are currently no assumptions
There are no major accessibility support issues known for this rule.
- https://www.w3.org/TR/UNDERSTANDING-WCAG20/navigation-mechanisms-title.html
- https://www.w3.org/WAI/WCAG20/quickref/?showtechniques=242#qr-navigation-mechanisms-title
- https://www.w3.org/TR/WCAG20-TECHS/G88.html
- https://www.w3.org/TR/WCAG20-TECHS/H25.html
- The WCAG 2.0 Techniques already contain examples and code snippets to illustrate which content passes or fails the test. Whenever possible WCAG-ACT-RULES-CG refers to those. Another source for test cases is the W3C Before and After Demonstration.
This page has a title
with content.
<html>
<title>This page has a title</title>
</html>
This page gives a title
to an iframe.
<html>
<title>This page gives a title to an iframe</title>
<iframe src="../test-assets/sc2-4-2-title-page-without-title.html"></iframe>
</html>
This page has two title
elements.
<html>
<head>
<title>Title of the page.</title>
</head>
<body>
<title>Title of the page.</title>
</body>
</html>
The title
is in the body
.
<html>
<body>
<title>Title of the page.</title>
</body>
</html>
The first title
element has content.
<html>
<head>
<title>Title of the page.</title>
</head>
<body>
<title></title>
</body>
</html>
The title
only contains characters that are not letters or numbers.
<html>
<title>#$@&%*!</title>
</html>
The page has no title
.
<html>
<h1>this page has no title</h1>
</html>
The title
element is empty.
<html>
<title></title>
</html>
The page has no title
.
<html>
<iframe src="../test-assets/sc2-4-2-title-page-with-title.html"></iframe>
</html>
The first title
element is empty.
<html>
<head>
<title></title>
</head>
<body>
<title>Title of the page.</title>
</body>
</html>
The title
only contains a separator character.
<html>
<title> </title>
</html>
This rule is not applicable to svg
elements.
<svg xmlns="http://www.w3.org/2000/svg">
<title>This is an SVG</title>
</svg>