Core Mobile Files Throws W3C Validation Errors jQuery
Hi folks,
The following basic page, with little more than the jQuery mobile link and scripts, throws the following W3C validation errors. I've addressed each of them with what I see as the justification; do you agree?
Page code:
- <?php
- header("cache-control: private");
- header("content-Type: application/xhtml+xml; charset=utf-8");
- ?>
- <!DOCTYPE html>
- <html>
- <head>
- <title>Page Title</title>
- <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a4/jquery.mobile-1.0a4.min.css" />
- <script type="text/javascript" src="http://code.jquery.com/jquery-1.5.2.min.js"></script>
- <script type="text/javascript" src="http://code.jquery.com/mobile/1.0a4/jquery.mobile-1.0a3.min.js"></script>
- </head>
- <body>
- <div>Hello world</div>
- </body>
- </html>
1. [Severity: Severe] The CSS style sheet is not syntactically valid CSS
# My motivation for this post; where in the CSS file is there a syntactical error?
2. [Severity: Low] A length property uses an absolute unit
# Any plans in place to convert this to ems?.
3. [Severity: Low] The total size of the page (55.9KB) exceeds 20 kilobytes (Primary document: 426B, Images: 14.1KB, Style sheets: 41.4KB)
# Fair enough. I'll compromise size for jQuery power.
4.[Severity: Low] The embedded image or object is not of type image/gif or image/jpeg (image/png)
# Probably .png.
5. The CSS style sheet contains rules referencing the position, display or float properties
# Hmmm.... not sure how to address this one. May require a lot of work to fix this.
6. The document uses a non-XML doctype (no DTD found or doctype declaration invalid)
# Validator doesn't like the HTML 5 doctype, but according to the following quote that's OK, "A jQuery Mobile site must start with an HTML5 'doctype' to take full advantage of all of the framework's features. (Older devices with browsers that don't understand HTML5 will safely ignore the 'doctype' and various custom attributes.)"
http://jquerymobile.com/demos/1.0a4/#docs/pages/docs-pages.html
7. The resource does not specify UTF-8 as character encoding
# I believe that this could be solved simply by adding the "@charset" declaration to the CSS file.
8. The document uses scripting
# Yes. It does :)
9. The CSS Style contains at-rules, properties, or values that may not be supported
# Again, a compromise.
Here's the URL of the page:
http://sexydevelopment.com/demo/v3/index.php
Check it yourself here:
http://validator.w3.org/mobile/
keith@sexydevelopment.com