Work with "application/xhtml+xml" documents
See original GitHub issueFeature request summary
When running Lighthouse, ideally it would still work with the application/xhtml+xml
mime type.
What is the motivation or use case for changing this?
It should be able to continue as a normal HTML document, rather than assuming all checks have failed.
I’m not expecting it to do any additional checks (the browser would have already ensured it’s valid XML), but I’d still like it to work on my development server (I disable XML mode on Demo and Live just incase the website issues some HTML which isn’t valid XML).
How is this beneficial to Lighthouse?
Lighthouse should be able to check a HTML document that’s been served in XML mode - it’s still a perfectly good HTML document, just authored to a stricter set of rules (e.g. correct nesting of tags, all attributes have been quoted, no double use of attributes on a tag).
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:13 (1 by maintainers)
Top GitHub Comments
Thanks for filing @craigfrancis!
Lighthouse advice is specifically targeted to HTML. Auditing an XHTML document yields several errors across Lighthouse as well as some incorrect advice, which we definitely wouldn’t want to spread. We’ve explicitly decided to limit Lighthouse to HTML. Refer to https://github.com/GoogleChrome/lighthouse/issues/10206 and https://github.com/GoogleChrome/lighthouse/issues/9245 for more discussion and reasoning.
Understood, I agree a completely fatal run for XHTML was a bit harsh compared to say a toplevel warning to indicate non-support instead.
We can let this issue track that effort. It seems like you already started some commits working on this would you be interested in a PR that does the warning conversion? 😃