How to Fix the Lighthouse “Document doesn’t have a title element” Error
If Lighthouse reports "Document doesn't have a <title> element" (in a Japanese-language report, the same message appears as a Japanese label meaning "No <title> element is specified for the document"), the page either has no title or its title is empty. Add a <title> that describes the page inside <head> to fix it. The <title> is the page name shown in browser tabs, bookmarks, and search results, and it also gives screen reader users a clue about what the page is about.
In my test environment, I ran Lighthouse on a page without a <title> and confirmed how much each category score dropped and that the warning went away once I fixed it. I also tested a <title> that contained only whitespace and a page that set its title with JavaScript.
The test environment was Ubuntu 24.04, Node.js 22.23.5, and Lighthouse 13.6.0 (the CLI installed with npm; the bundled axe-core is 4.14.0). The browser was Google Chrome for Testing 158, specified with CHROME_PATH and run in headless mode. I checked the value of document.title in the browser using Chromium 158 launched by Playwright 1.63.0. I ran only the Accessibility and SEO categories (--only-categories=accessibility,seo) with the default mobile settings. I created the pages in the test environment and served them from 127.0.0.1 with a small server written in Node.js. I did not test the Lighthouse panel in Chrome DevTools, PageSpeed Insights, how the page appears in actual search results, or how it is read aloud by a screen reader.
Warnings on a page without a title
The test page was a Japanese page with one heading and one paragraph. It had <meta charset> and <meta name="description">, but no <title>.
<!doctype html>
<html lang="ja">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="窓辺で寝ている猫の写真と、その日の様子を書いたページです。">
</head>
<body>
<main>
<h1>今日の猫</h1>
<p>窓辺で寝ているところです。日なたが好きで、午後はずっとここにいます。</p>
</main>
</body>
</html>
I ran Lighthouse on this page with the following command.
npx lighthouse http://127.0.0.1:8000/bad.html \
--only-categories=accessibility,seo \
--output=json --output=html --output-path=./out/bad \
--chrome-flags="--headless=new --no-sandbox" --quiet
The warning appeared in both Accessibility and SEO. In Accessibility, it was in the "Names and labels" section; in SEO, it was in the "Content Best Practices" section. Both are the same document-title audit, and the failing element shown is <html lang="ja">.

I used a small script of my own to pull the scores and the document-title result from the JSON report. The output is below. weight is the audit's weight, and weight total is the total weight of the audits that were included in the calculation.
accessibility score: 87 (document-title weight 7, group a11y-names-labels; weight total 54) failed: document-title
seo score: 90 (document-title weight 1, group seo-content; weight total 10.043478260869566) failed: document-title
[document-title] score=0 (binary) title: Document doesn't have a `<title>` element
node: <html lang="ja"> | Fix any of the following: / Document does not have a non-empty <title> element
In both categories, document-title was the only failing audit. This one audit alone lowered the Accessibility score to 87 and the SEO score to 90.
Add a title to the head that describes the page
The fix is to add one line inside <head>.
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="窓辺で寝ている猫の写真と、その日の様子を書いたページです。">
<title>窓辺で寝る猫の一日 | 猫の観察日記</title>
</head>
When I ran Lighthouse again under the same conditions, document-title passed, and both the Accessibility and SEO scores were 100.
accessibility score: 100 (document-title weight 7, group a11y-names-labels; weight total 54) failed: (none)
seo score: 100 (document-title weight 1, group seo-content; weight total 10.043478260869566) failed: (none)
[document-title] score=1 (binary) title: Document has a `<title>` element
Lighthouse only checks whether a non-empty title exists. It does not judge what the wording should be. The MDN page for the <title> element recommends giving each page its own title, putting the page's main purpose first and the site name after it. This way, screen readers announce the page's purpose first. That is why the example above puts the page's topic (a day of a cat by the window) first and the site name (a cat observation diary) after it.
A whitespace-only title also fails
I also tested pages that have a <title> element but no real content in it.
| How the title is written | document-title |
Accessibility | SEO | document.title in the browser |
|---|---|---|---|---|
No <title> |
Fail | 87 | 90 | "" |
<title></title> |
Fail | 87 | 90 | "" |
<title> </title> (three ASCII spaces) |
Fail | 87 | 90 | "" |
<title> </title> (one ideographic space) |
Fail | 87 | 90 | " " |
<title>窓辺で寝る猫の一日 | 猫の観察日記</title> |
Pass | 100 | 100 | The title as written |
For the empty <title> and the <title> containing only ASCII spaces, document.title in the browser was an empty string, and the result was the same as having no <title>. The HTML specification says that when document.title is returned, leading and trailing ASCII whitespace is removed and each run of consecutive ASCII whitespace inside is collapsed into one space.
For the <title> containing only an ideographic space, document.title in the browser kept that one full-width space. Lighthouse still failed it. The doc-has-title check in axe-core 4.14.0, which Lighthouse uses internally, passes document.title through a string sanitizing function and then calls JavaScript's trim(). trim() also removes ideographic spaces, so the title is judged to be empty.
If you have written a <title> but still get the warning, check the HTML source to see whether the content of the <title> is only whitespace.
A title set with JavaScript, or a title inside body, passed
I also tested a page with no <title> in the HTML, where the title was set at the end of the page with document.title.
<script>document.title = "窓辺で寝る猫の一日 | 猫の観察日記";</script>
This page passed, with both the Accessibility and SEO scores at 100. When I opened it in a browser, a <title> element had been created inside <head>. Lighthouse judges the page after it has loaded and the script has run. On the other hand, when I fetched the HTML the server returns with curl, there was no <title> anywhere. So a page can pass Lighthouse even when its HTML source has no title.
A page with a <title> written inside <body> also passed (both Accessibility and SEO at 100). In the browser, the <title> element stayed inside <body>, and document.title held the title. The HTML specification takes document.title from the first <title> element in the document, so a title in <body> is still read as the page title.
However, the title element section of the HTML specification says a <title> may only be placed inside <head>, and only if there is no other <title>. Even if Lighthouse does not warn you, write exactly one <title> inside <head>.
The Accessibility score is affected most
In the default configuration file for Lighthouse 13.6.0 (default-config.js), the weight of document-title is 7 in Accessibility and 1 in SEO.
On the test page, the total weight of the audits included in the Accessibility calculation was 54. With document-title failing, the score was 47÷54, which is 87. The SEO weight total was about 10.04, and with the audit failing, the score was 90. A single missing <title> lowers the Accessibility score by 13 points.
The weight of 7 for Accessibility is the same as the weight of link-name, which applies when a link has no name, and frame-title, which applies when an iframe has no title. In Lighthouse's score calculation (scoring.js), an audit that is marked "not applicable" because the page has no matching elements gets a weight of 0 and is left out of the calculation. As a result, the total weight changes from page to page, and so does the number of points lost.





