Page title missing (document-title)

The document-title rule flags a page that has no <title> element, or one that is empty. The title is the first thing a screen reader announces and the label on every browser tab, bookmark and search result. The fix is a unique, descriptive <title> in the <head> of every page.

What the rule means

WCAG 2.4.2 Page Titled requires that every web page has a title that describes its topic or purpose. In HTML that is the <title> element inside <head>.

axe-core reads document.title of the rendered page. The rule fails when it is missing, empty or only whitespace, and passes as soon as there is any text – including a title set by script before the check runs.

What the rule does not check:

  • whether the title describes the page. "Home", "Untitled" or "Page" pass the rule and still fail 2.4.2 in spirit, because they tell nobody where they are;
  • whether several pages share the same title;
  • whether a single-page app updates the title when the view changes.

A good title puts the specific part first and the site name last: "Delivery and returns – Example Shop". On a page with a form step or search results, include that state: "Step 2 of 3: Address – Checkout – Example Shop", "Error: Contact form – Example Ltd".

Who is affected

Blind people using a screen reader hear the title first when a page loads and when they switch tabs – it is how they confirm they arrived at the right place. People with cognitive or memory impairments, and anyone with many tabs open, use titles to find their way back. People using screen magnifiers see only part of the screen, so the tab label is often the quickest orientation. Bookmarks, browser history and search results all show the title too.

Why the check fails

  • Single-page apps that ship an empty <title></title> in the HTML shell and never set one.
  • Headless CMS setups where the template prints an SEO field that editors left empty.
  • Static error pages – 404, 500, maintenance – built outside the main template.
  • Landing pages and page-builder exports whose <head> was trimmed down.
  • Framework layouts where one route forgets the title component or head helper.
  • Pages generated from documents, such as HTML exports of office files, which keep an empty title field.

How to fix it

  1. Set the title in the base layout, so no page can be rendered without one. Fall back to the page heading if the SEO field is empty.
  2. Make it unique and descriptive: page topic first, then section, then site name.
  3. In a single-page app, update document.title on every route change, together with moving focus to the new content.
<!-- Before: no title element in the head -->
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
  </head>
  <body>
    <main><h1>Delivery and returns</h1></main>
  </body>
</html>
<!-- After: a descriptive title – page first, site name last -->
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Delivery and returns – Example Shop</title>
  </head>
  <body>
    <main><h1>Delivery and returns</h1></main>
  </body>
</html>

In a client-side router, the title belongs in the same place as the route's data:

// After each route change: name the new view in the tab title
router.afterEach((to) => {
  document.title = `${to.meta.title} – Example Shop`;
});

How to test it manually

  1. Look at the browser tab, or run document.title in the console.
  2. Ask: does the title alone tell me which page this is? Compare it with the main heading.
  3. Open several pages of the same type – product pages, articles, search results – and check that their titles differ.
  4. In a single-page app, navigate between views and watch the tab label change.
  5. With a screen reader, reload the page and listen to what is announced first (NVDA: Insert + T reads the title).

2.4.2 Page Titled, Level A. Related: 2.4.6 Headings and Labels, since the title and the main heading should tell the same story, and 3.3.1 Error Identification when a form reloads with errors.

How Reviseberg reports it

Reviseberg runs document-title on every crawled page at 1280px. The issue list shows the rule with its severity, WCAG criterion 2.4.2 and level, the number of pages, and the points you get back by fixing it; the detail view shows every affected page, so a group of error pages or one broken template stands out. You can mark a finding as "ignore", "can't fix" or "false positive" with a reason; every decision is logged.

Titles also matter for search, and Reviseberg's separate SEO module checks them from that side: missing, too long, too short and duplicate titles. Those SEO findings are scored on their own and never move the accessibility score. Whether a title actually describes its page is a judgement a person makes.

  • undefined – the other fact every page template needs.
  • undefined – the page has no main heading to match the title.
  • undefined – the same idea for embedded frames.

Check the titles of every page on your site – get a free scan

Frequently asked questions

Does the title have to match the H1?

No, but they should agree. The title usually adds the site name; the H1 names the page itself.

Is a title set with JavaScript enough?

For the rule, yes, if it is set before the check runs. For people, it has to change with every view of a single-page app, not just on the first load.

Are duplicate titles a WCAG failure?

Not automatically, but identical titles on different pages rarely describe each page's topic. The document-title rule does not check duplicates; Reviseberg reports them in the SEO module.

How long should a title be?

WCAG sets no length. Keep the distinguishing part at the start, because tabs and search results cut off the end.

Sources

  1. W3C, Understanding SC 2.4.2 Page Titled – https://www.w3.org/WAI/WCAG22/Understanding/page-titled
  2. Deque University, axe-core 4.13 rule document-title – https://dequeuniversity.com/rules/axe/4.13/document-title
  3. W3C, Technique H25: Providing a title using the title element – https://www.w3.org/WAI/WCAG22/Techniques/html/H25
  4. WHATWG, HTML Standard: the title element – https://html.spec.whatwg.org/multipage/semantics.html#the-title-element

See what a scan finds on your site

One page in about thirty seconds, no email needed. The full report covers up to 100 pages and a keyboard journey.