Skip to content

HTML page title is descriptive

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:

Expectation

The target element describes the topic or purpose of the overall content of the document.

Assumptions

There are currently no assumptions.

Accessibility Support

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.

Bibliography

Accessibility Requirements Mapping

Input Aspects

The following aspects are required in using this rule.

Test Cases

Passed

Passed Example 1

Open in a new tab

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>

Passed Example 2

Open in a new tab

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>

Passed Example 3

Open in a new tab

This title element, which is within the body, describes the content of the document. Even though it is not placed within the head element, as expected according to the HTML specification, the rule still passes because the browser fixes it and it doesn’t cause any known accessibility issues.

<html lang="en">
	<head> </head>
	<body>
		<title>Clementine harvesting season</title>
		<p>
			Clementines will be ready to harvest from late October through February.
		</p>
	</body>
</html>

Failed

Failed Example 1

Open in a new tab

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>

Failed Example 2

Open in a new tab

This title element, the first of two, does not describe the content of the document. Most browsers, and this rule, only look at the first title element.

<html lang="en">
	<head>
		<title>First title is incorrect</title>
		<title>Clementine harvesting season</title>
	</head>
	<body>
		<p>
			Clementines will be ready to harvest from late October through February.
		</p>
	</body>
</html>

Failed Example 3

Open in a new tab

This page has a generic document title. The title contains the website name, but does not describe the page.

<html lang="en">
	<head>
		<title>University of Arkham</title>
	</head>
	<body>
		<h1>Search results for "accessibility" at the University of Arkham</h1>
		<p>None</p>
	</body>
</html>

Inapplicable

Inapplicable Example 1

Open in a new tab

This title element is a child of an 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>

Glossary

Outcome

An outcome is 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:

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: Implementations 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.

Web page (HTML)

An HTML web page is the set of all fully active documents which share the same top-level browsing context.

Note: Nesting of browsing context mostly happens with iframe and object. Thus a web page will most of the time be a “top-level” document and all its iframe and object (recursively).

Note: Web pages as defined by WCAG are not restricted to the HTML technology but can also include, e.g., PDF or DOCX documents.

Note: Although web pages as defined here are sets of documents (and do not contain other kind of nodes), one can abusively write that any node is “in a web page” if it is a shadow-including descendant of a document that is part of that web page.

Whitespace

Whitespace are characters that have the Unicode “White_Space” property in the Unicode properties list.

This includes:

Rule Versions

  1. Proposed version, 30 August 2023 (compare)
  2. Latest version, 30 August 2023

Implementations

This section is not part of the official rule. It is populated dynamically and not accounted for in the change history or the last modified date.

Implementation Type Consistency Report
Alfa (fully automated) 0.80.0 Automated tool Partial Alfa (fully automated) Report
Alfa (semi-automated) 0.80.0 Semi-automated tool Consistent Alfa (semi-automated) Report
Axe DevTools Pro 4.37.1 Semi-automated tool Consistent Axe DevTools Pro Report
Trusted Tester 5.1 Test methodology Consistent Trusted Tester Report
Back to Top

This is an unpublished draft preview that might include content that is not yet approved. The published website is at w3.org/WAI/.