Errora11y.page-title

The page has no title to announce

Why it matters

The <title> is the first thing a screen reader says when a page opens, and the only thing it says when someone flicks between tabs or windows. Without one it reads the address, or the file name, and every tab of your site sounds the same. It is also what a sighted visitor with twelve tabs open is looking for.

The title should say what this page is, before it says whose site it is: "Wedding cakes · Flour & Co", not "Flour & Co" forty times.

Source: WCAG 2.2, 2.4.2 Page Titled (Level A).

How to fix it

Give every page a <title> of its own in the <head>:

<title>Wedding cakes in Leeds · Flour & Co</title>

In a single-page app, set document.title when the route changes, or a screen-reader user never hears that the page did.

Examples

These are the rule's own test pages, and what it says about each. They are run on every change to the rule book.

<html lang="en">
<title>
</title>
<h1>Wedding cakes</h1>

ErrorThe <title> is empty, so a screen reader announces the address instead of a name.

fail-empty
<html lang="en">
<h1>Wedding cakes</h1>

ErrorThe page has no <title>, so a screen reader announces its address instead of its name.

fail-none
<html lang="en">
<title>Wedding cakes in Leeds · Flour &amp; Co</title>
<h1>Wedding cakes</h1>

PassedA screen reader announces the page as "Wedding cakes in Leeds · Flour & Co".

pass-title