w3c / Unicorn

Unicorn - W3C's Unified Validator
https://validator.w3.org/unicorn/
Other
128 stars 59 forks source link

Remove invalid warnings for encoding and mime when declaring support in headers. #114

Closed vivienlacourba closed 8 years ago

vivienlacourba commented 8 years ago

Reported by John A Bilicki III on 2 Aug 2010 13:00 UTC The mobileOK Checker warns about XHTML 1.1 doctype and the UTF-8 encoding however with the latest builds of my site that I have been validating against I do not serve the doctype or encoding or doctype unless support is explicitly declared in the ''http_accept'' or ''http_charset'' headers.

These warnings would ''only'' be valid if these headers did not explicitly declare support for the doctype or encoding.

Therefore these warnings should be removed.

vivienlacourba commented 8 years ago

Comment by John A. Bilicki III on 2 Aug 2010 13:02 UTC For clarification if the ''http_accept'' declares support for application/xhtml+xml then the XHTML 1.1 doctype is served in my work otherwise it falls back to XHTML 1.0 Strict.

If there is a mobile-specific declaration in any header then I would be more then happy to serve a mobile specific doctype.

vivienlacourba commented 8 years ago

Comment by fd on 22 Oct 2010 13:01 UTC Sorry for the slow response. This ticket had somehow been missed. While Unicorn unifies the entry points for different validation tools, most validation tools are still being developed and tracked separately. The Provide feedback for the mobileOK Checker page explains how to provide feedback for the mobileOK Checker.

Back to the original point. The mobileOK Checker sends specific HTTP header fields when it run tests on a Web page. In particular, the Accept and Accept-Charset HTTP header fields it sends are explicit about support for the "application/xhtml+xml" MIME type and "UTF-8" charset. From what I understand, you serve a document using an XHTML 1.1 doctype in that case.

That's perfectly reasonable. The warning returned by the mobileOK Checker is not to be read as an error. In your case, it is meant to say "You are using an XHTML 1.1 doctype, which is a superset of XHTML Basic 1.1. A few mobile devices may not support XHTML 1.1. tags that are not defined in XHTML Basic 1.1. It may be a better idea to use the XHTML Basic 1.1 doctype directly to be able to validate your content with a markup validation tool".

Actually, the mobileOK Checker also validates the content against the XHTML Basic 1.1 doctype regardless of the doctype precised in your content. As such, the warning should be toned down to an informational message.

I am rejecting this ticket here as this is not the right place for mobileOK Checker specific bugs. I have created bug 11123 in mobileOK Checker's bug database to track this down.