HTML Page has a title

  • Rule Typeatomic
  • Rule ID: 2779a5
  • Last modified: Aug 21, 2019
  • Accessibility Requirements Mapping
    • 2.4.2 Page Titled (Level: A)
      • Learn More about 2.4.2 (Page Titled)
      • Required for conformance to WCAG 2.0 and above on level A and above
      • Outcome mapping:
        • Any failed outcomes: not satisfied
        • All passed outcomes: further testing is needed
        • An inapplicable outcome: further testing is needed
  • Input Aspects

Description

This rule checks that the HTML page has a title.

Applicability

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.

Expectation 1

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.

Expectation 2

The first HTML title element that is a descendant of the document element has children that are text nodes that are not only whitespace.

Assumptions

There are currently no assumptions

Accessibility Support

There are no major accessibility support issues known for this rule.

Background

Test Cases

Passed

Passed Example 1

This page has a title with content.

<html>
	<title>This page has a title</title>
</html>

Passed Example 2

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>

Passed Example 3

This page has two title elements.

<html>
	<head>
		<title>Title of the page.</title>
	</head>
	<body>
		<title>Title of the page.</title>
	</body>
</html>

Passed Example 4

The title is in the body.

<html>
	<body>
		<title>Title of the page.</title>
	</body>
</html>

Passed Example 5

The first title element has content.

<html>
	<head>
		<title>Title of the page.</title>
	</head>
	<body>
		<title></title>
	</body>
</html>

Passed Example 6

The title only contains characters that are not letters or numbers.

<html>
	<title>#$@&%*!</title>
</html>

Failed

Failed Example 1

The page has no title.

<html>
	<h1>this page has no title</h1>
</html>

Failed Example 2

The title element is empty.

<html>
	<title></title>
</html>

Failed Example 3

The page has no title.

<html>
	<iframe src="../test-assets/sc2-4-2-title-page-with-title.html"></iframe>
</html>

Failed Example 4

The first title element is empty.

<html>
	<head>
		<title></title>
	</head>
	<body>
		<title>Title of the page.</title>
	</body>
</html>

Failed Example 5

The title only contains a separator character.

<html>
	<title> </title>
</html>

Inapplicable

Inapplicable Example 1

This rule is not applicable to svg elements.

<svg xmlns="http://www.w3.org/2000/svg">
  <title>This is an SVG</title>
</svg>

Glossary

Outcome

key: outcome

A conclusion that comes from evaluating an ACT Rule on a test subject or one of its constituent test target. An outcome can be one of the three following types:

  • Inapplicable: No part of the test subject matches the applicability
  • Passed: A test target meets all expectations
  • Failed: A test target does not meet all expectations

Note: A rule has one passed or failed outcome for every test target. When there are no test targets the rule has one inapplicable outcome. This means that each test subject will have one or more outcomes.

Note: Implementers using the EARL10-Schema can express the outcome with the outcome property. In addition to passed, failed and inapplicable, EARL 1.0 also defined an incomplete outcome. While this cannot be the outcome of an ACT Rule when applied in its entirety, it often happens that rules are only partially evaluated. For example, when applicability was automated, but the expectations have to be evaluated manually. Such "interim" results can be expressed with the incomplete outcome.

Whitespace

key: whitespace

Characters that have the Unicode "White_Space" property in the Unicode properties list.

This includes:

  • all characters in the Unicode Separator categories, and
  • the following characters in the Other, Control category:

    • Character tabulation (U+0009)
    • Line Feed (LF) (U+000A)
    • Line Tabulation (U+000B)
    • Form Feed (FF) (U+000C)
    • Carriage Return (CR) (U+000D)
    • Next Line (NEL) (U+0085)

Changelog

Aug 21, 2019fix: update links to WCAG21 resources (#776)
Aug 21, 2019Editorial changes (#725)
May 9, 2019Chore: Adapt site to ACT Rules CR format (#547)
May 7, 2019Template update - HTML Page has a title (#525)
May 2, 2019chore: add manual reporting download links to rule (#492)
Apr 29, 2019chore: rename files and update associations (#489)
Apr 16, 2019chore: add unique id to all rules (#478)
Apr 15, 2019chore: WCAG ACT RULES CG Website Update (#437)
Apr 10, 2019Rule update: "HTML page has a title" (#440)
Jan 11, 2019chore: update name to wcag-act-rules-cg (#396)
Oct 10, 2018chore: Mark all SVG documents and add missing namespaces (#300)
Oct 10, 2018chore: create svg testcase files (#299)
Oct 9, 2018Fix: testcase generation (#296)
Sep 19, 2018fix: test cases for rules
Aug 30, 2018Chore: Update test cases format and descriptions (#230)
Jul 13, 2018fix: links in background were not anchors (#187)
Jun 14, 2018FINAL: Glossary generation in rules & reverse linking in algorithms (#147)
May 29, 2018FINAL: SC2-4-2-title (#116)
Apr 20, 2018++ sc2-4-2-title (#87)
Jul 27, 2016Merge branch 'jekyll' into algorithms
Jul 27, 2016Moved the rest of the drafts over to the updated format
Jul 25, 2016many format updates to drafts
Jul 25, 2016updated test mode format in draft
Jul 25, 2016adjust lines in drafts
Jul 24, 2016update spacing in rules
Jul 24, 2016Fixed test mode rename issue
Apr 2, 2016update spec template
Apr 2, 2016Insert name into spec
Apr 2, 2016update external links
Apr 2, 2016fixes to user question
Apr 2, 2016cleanup
Feb 28, 2016more format updates
Feb 28, 2016put in the drafts

Useful Links


Implementations

Tool NameCreated ByReport
AlfaSiteimproveView Report
Axe-coreDeque SystemsView Report
QualWebLASIGE, Faculdade de Ciências da Universidade de LisboaView Report

Acknowledgements