Give each page a title that says what it's about

Documents must have <title> element to aid in navigation is the message for axe's document-title rule, and it means the page has no title element, or has one with no text in it. The title is the first thing a screen reader announces when a page opens, and it names the browser tab, so a page without one leaves people unsure where they've landed. Add a title element inside head with a short description of the page that no other page on your site shares.

Why screen reader users need the page title

  • Deque's rule page explains that the title is the first thing screen reader users hear when a page loads, and that without a descriptive, unique one they have to read into the page to find out what they've opened. The rule fails a missing title element and one that's present but empty.

  • WCAG's Page Titled criterion, at Level A, asks for titles that describe each page's topic or purpose, and W3C adds that a single-page app should change its title to match each view. axe confirms a title exists; whether it describes the page is a call a person has to make.

  • The title element belongs in head, one per document, and it's what the browser shows in the tab and title bar. MDN suggests putting the page's main purpose first and the site name after it, so a screen reader announces the purpose first.

Page title examples

PageTitle
A product pageTan leather tote bag - Yoursite
A blog postHow to care for a leather bag - Yoursite blog
A step in checkoutPayment, step 2 of 3 - Yoursite
A search results pageResults for wallet - Yoursite
A form that came back with errors2 errors - Contact us - Yoursite
A missing pagePage not found - Yoursite

Set the title on each view of a single-page app

// After the router renders a new view, name it in the title
document.title = "Order history - Yoursite";

How to fix a missing page title

  1. Find where the head is renderedIn a framework, the title comes from a head or metadata setting in the root layout or each route. In a CMS, it comes from the theme template and each page's title field.
  2. Write a title for each pagePut what's unique first, such as the product or article name, and your site name after it, so someone moving between tabs hears the difference straight away.
  3. Replace repeated and placeholder titlesTwo pages with the same title sound identical in a tab list or browser history. Titles like Untitled, New page or Home on every page need rewriting.
  4. Update titles in a single-page appSet the title again after every route change. Otherwise each view keeps the title of the page that first loaded.
  5. Rerun the ruleRun axe on a page from each template, and on views reached by clicking through the app, not only on the first page load.

Frequently asked questions

Does the page title have to match the h1?

No, but Deque's rule page suggests keeping them close, since both describe the page. The title often adds the site name, while the h1 names only the page.

Should the title change when a form has errors?

It can help. MDN's title reference suggests putting the error count at the start of the title when a submission comes back with errors. It also notes that screen readers don't announce a title that changes after the page loads, so pair it with a live region if the change matters.

Is this the same title Google shows in results?

Not always. Google's title link guide lists the title element first among the sources it uses for a result's headline, along with headings and other prominent text, and asks for a descriptive, concise and unique title on every page, which is the same title that fixes this rule.