GoogleChrome / GoogleChrome/lighthouse
Don't suggest adding HTML doctype to XHTML documents
- Dominant language
- JavaScript
- Stars
- 30.8k
- Forks
- 9.8k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 20
Description
Given a basic `.xhtml` file, such as,
```xhtml
Test
Test
```
served with `content-type: application/xhtml+xml`, Lighthouse incorrectly reports `Page lacks the HTML doctype, thus triggering quirks mode` (https://web.dev/doctype/).
> If you serve your page as XHTML (...), you do not need a DOCTYPE to enable standards mode, as such documents always use full standards mode.
https://developer.mozilla.org/en-US/docs/Web/HTML/Quirks_Mode_and_Standards_Mode
Contributor guide
Research direction
Use the provided basic .xhtml document served as application/xhtml+xml to reproduce the warning, then inspect the Lighthouse doctype audit entry point that handles it. Done means XHTML documents no longer report a missing HTML doctype while documents that need one still do.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html, javascript
- Domain
- devtools, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100