Test report for the W3C mobileOK checker library

The checker Task Force of the Mobile Web Best Practices Working Group has developed an open-source Java library to check conformance of a page with the W3C mobileOK Basic specification.

This library is accompanied by the set of test cases described below:

AUTO_REFRESH

3.1 AUTO_REFRESH and REDIRECTION

This test does not determine whether the user is able to opt out of refresh.

If a meta element is present with http-equiv attribute value of "refresh",

If the URI specified as part of the content attribute is not the current resource's URI, FAIL

Else, warn

If a Refresh HTTP header is present,

If the URI specified in the header value is not the current resource's URI, FAIL

Else, warn

Test caseDescriptionChecker result
AutoRefreshTest/1 (source) FAIL: a meta element is present with http-equiv attribute value of "refresh" and the URI specified in the content attribute is not the current resource's URI

AUTO_REFRESH:

MAIN_DOCUMENT:

  • WARN: A matching HTTP response header does not exist for a meta http-equiv=refresh [META_HTTP_EQUIV-1]
AutoRefreshTest/2 (source) WARN: a meta element is present with http-equiv attribute value of "refresh", but it redirects back to the same URI

AUTO_REFRESH:

MAIN_DOCUMENT:

  • WARN: A matching HTTP response header does not exist for a meta http-equiv=refresh [META_HTTP_EQUIV-1]
AutoRefreshTest/3 (source) FAIL: a Refresh HTTP header is present, and the specified URI is not the current resources URI

AUTO_REFRESH:

  • FAIL: The document uses a Refresh HTTP header to redirect to a different page [AUTO_REFRESH-3]
AutoRefreshTest/4 (source) WARN: a Refresh HTTP header is present, but it points back to the current resource's URI

AUTO_REFRESH:

  • WARN: The document is served with a Refresh HTTP header [AUTO_REFRESH-4]
AutoRefreshTest/5 (source) FAIL: while this page does have an http-equiv header that points back to this URI, the HTTP header contains a refresh value that points to a different URI

AUTO_REFRESH:

  • FAIL: The document uses a Refresh HTTP header to redirect to a different page [AUTO_REFRESH-3]
  • WARN: The document uses an auto-refresh [AUTO_REFRESH-2]

MAIN_DOCUMENT:

  • WARN: A matching HTTP response header (refresh) exists but its value differs from the content attribute value [META_HTTP_EQUIV-2]
AutoRefreshTest/6 (source) FAIL: a edgecase test that ensures that an error is still thrown if no time is specified in the value of the header (@@@ but is that what the spec says???)

AUTO_REFRESH:

  • FAIL: The document uses a Refresh HTTP header to redirect to a different page [AUTO_REFRESH-3]

CACHING

3.2 CACHING

The purpose of the test is to alert providers to the fact that their content may not be cached, if it would be beneficial to do so.

Note:

Where both a meta element with http-equiv attribute and the corresponding HTTP header are found, the value of the HTTP header must be used - see also note under 2.4.4 Meta http-equiv Elements.

If the HTTP response contains neither an Expires nor Cache-Control header

If no meta http-equiv element is present, referring to those headers, FAIL

Continue the test using the value from the meta content attribute as though it were specified in the appropriate header, warn

If a Cache-Control HTTP header is present and contains value "no-cache", or contains value "max-age=0", warn

If a Pragma HTTP header is present and contains value "no-cache", warn

If an Expires and Date HTTP header are present, and the Expires header specifies a date which is not later than what the Date header specifies, warn

If any cache related header contains an invalid value, warn

If the HTTP response contains a Last-Modified header,

Request the same URI again, adding an If-Modified-Since request header whose value matches that of the Last-Modified response header

If the HTTP response contains a Last-Modified header and its value is again the same, and the HTTP response status is not 304 (Not Modified), warn

If the HTTP response contains an ETag header,

Request the same URI again, adding an If-None-Match request header whose value matches that of the ETag response header

If the HTTP response contains an ETag header and its value is again the same, and the HTTP response status is not 304 (Not Modified), warn

Test caseDescriptionChecker result
CachingTest/1 (source) WARN: contains a no-cache value in the HTTP Cache-Control header

CACHING:

  • WARN: "Cache-Control" HTTP header is present and contains value "no-cache", or contains value "max-age=0" [CACHING-3]
CachingTest/2 (source) WARN: This page contains a max-age=0 value in its HTTP Cache-Control Header

CACHING:

  • WARN: "Cache-Control" HTTP header is present and contains value "no-cache", or contains value "max-age=0" [CACHING-3]
CachingTest/3 (source) FAIL: This page cantains neither an Expires nor Cache-Control header and also does not contain a meta http-equiv element that refers to cache control or expires

CACHING:

  • FAIL: The document is served without caching information ("Expires" or "Cache-Control" header) [CACHING-1]
CachingTest/4 (source) WARN: This warns because there is no HTTP Response header that specifies Cache-Control but specifies it in a meta http-equic header; an additional warning is raised because this value is no-cache

CACHING:

  • WARN: The document's caching information is not provided in the HTTP headers [CACHING-2]
  • WARN: "Cache-Control" HTTP header is present and contains value "no-cache", or contains value "max-age=0" [CACHING-3]

MAIN_DOCUMENT:

  • WARN: A matching HTTP response header does not exist for a meta http-equiv=cache-control [META_HTTP_EQUIV-1]
CachingTest/5 (source) 2 WARN: There's a max-age=0 header in the Cache-Control header and there's a value of no-cache in the Pragma header

CACHING:

  • WARN: "Cache-Control" HTTP header is present and contains value "no-cache", or contains value "max-age=0" [CACHING-3]
  • WARN: The "Pragma" header contains the value "no-cache" [CACHING-4]
CachingTest/6 (source) WARN: Expires and Date HTTP header are present, and the Expires header specifies a date which is not later than what the Date header specifies, WARN

CACHING:

  • WARN: The "Expires" header contains a date in the past [CACHING-5]
CachingTest/7 (source) PASS: An expires header is present where the date is very much in the future

CACHING: PASS

CachingTest/8 (source) WARN: Cache-Control header contains an invalid value

CACHING:

  • WARN: A cache related header or a meta http-equiv value contains an invalid value (nocache) [CACHING-6]
CachingTest/9 (source) 2 WARN: There is an invalid cache-control value and an expires header with a date that has already passed

CACHING:

  • WARN: The "Expires" header contains a date in the past [CACHING-5]
  • WARN: A cache related header or a meta http-equiv value contains an invalid value (prvate) [CACHING-6]
CachingTest/10 (source) WARN: There's an E-Tag header and once the same URI is rerequested after adding a If-None-Match header, the E-Tag response has the same value and the HTTP response status is not 304. This is quite a special test since it needs the application server to behave incorrectly. Hence we actually use a special servlet to control the exact interaction, rather than serve a static file normally here.

CACHING:

  • WARN: There is an error in the "ETag" header [CACHING-8]
CachingTest/11 (source) WARN: This test illustrates the capture of invalid cache control values in both the HTTPHeaders and the meta http-equiv content values, as well as a max-age set to 0

CACHING:

  • WARN: "Cache-Control" HTTP header is present and contains value "no-cache", or contains value "max-age=0" [CACHING-3]
  • WARN: A cache related header or a meta http-equiv value contains an invalid value (nostore) [CACHING-6]
  • WARN: A cache related header or a meta http-equiv value contains an invalid value ("") [CACHING-6]

MAIN_DOCUMENT:

  • WARN: A matching HTTP response header (cache-control) exists but its value differs from the content attribute value [META_HTTP_EQUIV-2]
CachingTest/12 (source) WARN: the page resulting of a 302 redirection is served with a no-cache directive

CACHING:

  • WARN: "Cache-Control" HTTP header is present and contains value "no-cache", or contains value "max-age=0" [CACHING-3]

MAIN_DOCUMENT:

  • WARN: The HTTP status (in response to the resource http://localhost:8080/CachingTest/12/index.xhtml) indicates redirection (status code 3xx) and the URI identified by the HTTP Location header is a relative URI [HTTP_RESPONSE-5]
CachingTest/13 (source)WARN: There's an Last-Modified header and once the same URI is rerequested after adding a If-Modified-Since header, the Last-Modified response has the same value and the HTTP response status is not 304. This is quite a special test since it needs the application server to behave incorrectly. Hence we actually use a special servlet to control the exact interaction, rather than serve a static file normally here.

CACHING:

  • WARN: There is an error in the "Last-Modified" header [CACHING-7]

CHARACTER_ENCODING_SUPPORT

3.3 CHARACTER_ENCODING_SUPPORT and CHARACTER_ENCODING_USE

The DDC is defined to support only UTF-8 encoding, and hence this test fails if a resource is not encoded in UTF-8. The test does not require that resource always be encoded in UTF-8; the test merely checks that the resource is available in UTF-8 encoding, if requested. Resources may be represented using other encodings where appropriate. This test verifies that a DDC-like device which only accepts UTF-8 encoding may access the resource in UTF-8 encoding.

This test requires that character encoding is explicitly specified and recognizes the following methods of specification:

If the HTTP Content-Type header specifies a character encoding other than UTF-8, FAIL

If the HTTP Content-Type header does not specify a character encoding:

If there is no XML declaration, or UTF-8 character encoding is not specified in the XML declaration, FAIL

If the HTTP Content-Type header specifies an Internet media type starting with "text/":

If there is no meta element with http-equiv attribute that specifies UTF-8 character encoding, FAIL

If character encoding is specified in more than one way, and not all values are the same, FAIL

If the document is not valid UTF-8 (see 2.4.8 Validity), FAIL

For each resource specified by 2.4.6 Included Resources:

Request the resource

If the HTTP Content-Type header value of the response starts with "text/" but does not specify UTF-8 character encoding, warn

Test caseDescriptionChecker result
CharacterEncodingSupportTest/1 (source) FAIL: The HTTP Content-Type header specifies a character encoding other than UTF-8, however, the xml declaration specifies a UTF-8 encoding, so the error for multiple, different declarations of ecoding is also thrown

CHARACTER_ENCODING_SUPPORT:

CharacterEncodingSupportTest/2 (source) FAIL: The HTTP Content-Type header does not specify a character encoding and UTF-8 character encoding is not specified in the XML declaration

CHARACTER_ENCODING_SUPPORT:

  • FAIL: The HTTP Content-Type header does not specify a character encoding and no UTF-8 encoding or a non-UTF-8 is specified in the XML declaration [CHARACTER_ENCODING_SUPPORT-2]
CharacterEncodingSupportTest/3 (source) FAIL: The HTTP Content-Type header does not specify a character encoding and yhere is no XML declaration

CHARACTER_ENCODING_SUPPORT:

  • FAIL: The HTTP Content-Type header does not specify a character encoding and no UTF-8 encoding or a non-UTF-8 is specified in the XML declaration [CHARACTER_ENCODING_SUPPORT-2]
  • FAIL: The HTTP Content-Type header does not specify a character encoding and no UTF-8 encoding or a non-UTF-8 is specified in the XML declaration [CHARACTER_ENCODING_SUPPORT-2]
CharacterEncodingSupportTest/4 (source) FAIL: The HTTP Content-Type header does not specify a character encoding and the HTTP Content-Type header specifies an Internet media type starting with "text/" and there is no meta element with http-equiv attribute that specifies UTF-8 character encoding

CHARACTER_ENCODING_SUPPORT:

  • FAIL: The HTTP Content-Type header does not specify a character encoding but it specifies an Internet media type starting with "text/" and there is no meta element with http-equiv attribute that specifies UTF-8 character encoding [CHARACTER_ENCODING_SUPPORT-3]
CharacterEncodingSupportTest/5 (source) PASS: The Content-Type header does specify the encoding

CHARACTER_ENCODING_SUPPORT: PASS

CharacterEncodingSupportTest/6 (source) PASS: The HTTP Content-Type header does not specify a character encoding and the HTTP Content-Type header specifies an Internet media type starting with "text/", but there is a meta element with http-equiv attribute that specifies UTF-8 character encoding.

CHARACTER_ENCODING_SUPPORT: PASS

MAIN_DOCUMENT:

  • WARN: A matching HTTP response header (content-type) exists but its value differs from the content attribute value [META_HTTP_EQUIV-2]
CharacterEncodingSupportTest/7 (source) FAIL: The character encoding is specified with two different encodings, see xml-declaration and meta http-equiv

CHARACTER_ENCODING_SUPPORT:

MAIN_DOCUMENT:

  • WARN: A matching HTTP response header (content-type) exists but its value differs from the content attribute value [META_HTTP_EQUIV-2]
CharacterEncodingSupportTest/8 (source) FAIL: the document is not valid UTF-8.

CHARACTER_ENCODING_SUPPORT:

MAIN_DOCUMENT:

  • WARN: A matching HTTP response header (content-type) exists but its value differs from the content attribute value [META_HTTP_EQUIV-2]
CharacterEncodingSupportTest/9 (source) WARN: One of the external stylesheets, included as resource for this page, does not have a Content-Type header WARN: An included resource has a Content-Type header, and it specifies a content type of text/html, but it does not specify a particular character encoding

CHARACTER_ENCODING_SUPPORT:

  • WARN: This resource is served as "text/css" but does not specify UTF-8 as character encoding (charset parameter set to ascii) [CHARACTER_ENCODING_SUPPORT-6]
  • WARN: This resource is served as "text/html" but does not specify UTF-8 as character encoding (no charset parameter) [CHARACTER_ENCODING_SUPPORT-6]

CONTENT_FORMAT_SUPPORT

3.4 CONTENT_FORMAT_SUPPORT and VALID_MARKUP

Note:

In the following, an "html document" is a document that has "html" as its root element.

Note:

In the following, "regardless of its stated DOCTYPE" means that when assessing validity against the XHTML Basic 1.1 and XHTML MP 1.2 DTDs this may be carried out by inserting a DOCTYPE if none is present, or by replacing the given DOCTYPE with the appropriate DOCTYPE for the DTD under test.

Note:

In the following, "a known XHTML version" means XHTML Basic 1.0, XHTML Basic 1.1, XHTML-MP 1.0, XHTML-MP 1.1 or XHTML-MP 1.2.

If the document's Internet media type, as specified in the HTTP response Content-Type header, is not "application/xhtml+xml", "application/vnd.wap.xhtml+xml", or "text/html", FAIL

If the document's Internet media type is "text/html" or "application/vnd.wap.xhtml+xml", warn

If the document does not contain a DOCTYPE declaration, FAIL

If the document is not an HTML document, FAIL

If the DOCTYPE is not an XML DOCTYPE, warn

If the document is an HTML document and it has an XML DOCTYPE:

If the document does not declare the html namespace on its html root element, FAIL

If the DOCTYPE refers to a known XHTML version, validate against that DOCTYPE and if invalid, warn

Otherwise (if the DOCTYPE is not known), warn

If (regardless of its stated DOCTYPE) the document does not validate against the XHTML Basic 1.1 DTD:

If (regardless of its stated DOCTYPE) it does not validate against the XHTML-MP 1.2 DTD, FAIL

For each included resource (see 2.4.6 Included Resources):

If the response specifies an Internet media type that is not "text/css", "image/jpeg" or "image/gif", FAIL

If an image is required (see also 3.15 OBJECTS_OR_SCRIPT ) and the response specifies an Internet media type that is not "image/jpeg" or "image/gif", FAIL

If the Internet media type is "image/gif" or "image/jpeg", and the resource is not valid (see 2.4.8 Validity), FAIL

If a style sheet is required and the response specifies an Internet media type that is not "text/css", FAIL

If the Internet media type is "text/css" and the content is not valid CSS (see 2.4.8 Validity), FAIL

Test caseDescriptionChecker result
ContentFormatSupportTest/1 (source) FAIL: the document's media type, as specificed in the HTTP Response Content-Type header, is not "application/xhtml+xml", "application/vnd.wap.xhtml+xml", or "text/html"

CONTENT_FORMAT_SUPPORT:

  • FAIL: The document is served as "text/css", instead of one of "application/xhtml+xml", "application/vnd.wap.xhtml+xml", or "text/html" [CONTENT_FORMAT_SUPPORT-1]
ContentFormatSupportTest/2 (source) FAIL: the document does not contain a DOCTYPE declaration

CONTENT_FORMAT_SUPPORT:

ContentFormatSupportTest/3 (source) WARN: This document uses a non well-known DOCTYPE FAIL: it doesn't validate to XHTML Basic 1.1/MP 1.2.

CONTENT_FORMAT_SUPPORT:

  • FAIL: The root html element does not declare its namespace [CONTENT_FORMAT_SUPPORT-5]
  • WARN: The document uses an XHTML doctype that is not a well-known mobile-friendly doctype (-//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd) [CONTENT_FORMAT_SUPPORT-14]
  • FAIL: The document does not validate against the XHTML Basic 1.1 DTD nor MP 1.2: Element "font" is not allowed. [CONTENT_FORMAT_SUPPORT-6]
  • FAIL: The document does not validate against the XHTML Basic 1.1 DTD nor MP 1.2: The content of element type "body" must match "(h1 h2 h3 h4 h5 h6 ul ol dl p div pre blockquote address hr table form fieldset script noscript)+". [CONTENT_FORMAT_SUPPORT-6]
ContentFormatSupportTest/4 (source) WARN: This document does not validate to its stated DOCTYPE FAIL: nor to a mobile doctype

CONTENT_FORMAT_SUPPORT:

  • WARN: The document is not valid to its stated doctype: Element "center" is not allowed. [CONTENT_FORMAT_SUPPORT-13]
  • WARN: The document is not valid to its stated doctype: The content of element type "div" must match "(h1 h2 h3 h4 h5 h6 ul ol dl p div pre blockquote address hr table form fieldset br span em strong dfn code samp kbd var cite abbr acronym q tt i b big small sub sup a img object input select textarea label button script noscript)". [CONTENT_FORMAT_SUPPORT-13]
  • FAIL: The document does not validate against the XHTML Basic 1.1 DTD nor MP 1.2: Element "center" is not allowed. [CONTENT_FORMAT_SUPPORT-6]
  • FAIL: The document does not validate against the XHTML Basic 1.1 DTD nor MP 1.2: The content of element type "div" must match "(h1 h2 h3 h4 h5 h6 ul ol dl p div pre blockquote address hr table form fieldset br span em strong dfn code samp kbd var cite abbr acronym q tt i b big small sub sup a img object input select textarea label button script noscript)". [CONTENT_FORMAT_SUPPORT-6]
ContentFormatSupportTest/5 (source) WARN: the document's media type, as specificed in the HTTP Response Content-Type header, is "application/vnd.wap.xhtml+xml"

CONTENT_FORMAT_SUPPORT:

  • WARN: The document is served as "application/vnd.wap.xhtml+xml" instead of the recommended "application/xhtml+xml" [CONTENT_FORMAT_SUPPORT-2]
ContentFormatSupportTest/6 (source) FAIL: an image that is identified through it's HTTPResponse header as a jpeg or gif, but is invalid according to that content type

CONTENT_FORMAT_SUPPORT:

ContentFormatSupportTest/7 (source) FAIL: includes an image in a non-accepted format (PNG)

CONTENT_FORMAT_SUPPORT:

ContentFormatSupportTest/8 (source) FAIL: because there is an externally linked file of type "text/css", which is specified as a stylesheet resource, and it does not validate to proper CSS

CONTENT_FORMAT_SUPPORT:

ContentFormatSupportTest/9 (source) FAIL: this document does not contain a Content-Type header with any value.

CONTENT_FORMAT_SUPPORT:

  • FAIL: The document is served as "", instead of one of "application/xhtml+xml", "application/vnd.wap.xhtml+xml", or "text/html" [CONTENT_FORMAT_SUPPORT-1]
ContentFormatSupportTest/10 (source) FAIL: The root html element doesn't have the XHTML namespace set.

CONTENT_FORMAT_SUPPORT:

ContentFormatSupportTest/11 (source) PASS: a PNG image embedded in a GIF object is OK.

CONTENT_FORMAT_SUPPORT: PASS

ContentFormatSupportTest/13 (source) WARN: the doctype is not an XML Doctype WARN: the content-type is text/html

CONTENT_FORMAT_SUPPORT:

  • WARN: The document uses a non-XML doctype (-//W3C//DTD HTML 4.01//EN http://www.w3.org/TR/html4/strict.dtd) [CONTENT_FORMAT_SUPPORT-12]
ContentFormatSupportTest/14 (source) A valid XHTML 1.1 document (WARN: not a well-known doctype)

CONTENT_FORMAT_SUPPORT:

  • WARN: The document uses an XHTML doctype that is not a well-known mobile-friendly doctype (-//W3C//DTD XHTML 1.1//EN http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd) [CONTENT_FORMAT_SUPPORT-14]
ContentFormatSupportTest/15 (source) A valid XHTML 1.1 document, without FPI (WARN: not a well-known doctype)

CONTENT_FORMAT_SUPPORT:

  • WARN: The document uses an XHTML doctype that is not a well-known mobile-friendly doctype ( http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd) [CONTENT_FORMAT_SUPPORT-14]
ContentFormatSupportTest/16 (source) FAIL: the document is not an HTML document

CONTENT_FORMAT_SUPPORT:

ContentFormatSupportTest/17 (source) FAIL: the image embedded in the CSS Style is a PNG image

CONTENT_FORMAT_SUPPORT:

  • FAIL: The document is served as "text/css", instead of one of "application/xhtml+xml", "application/vnd.wap.xhtml+xml", or "text/html" [CONTENT_FORMAT_SUPPORT-1]
  • FAIL: The embedded image or object is not of type image/gif or image/jpeg (image/png) [CONTENT_FORMAT_SUPPORT-8]
ContentFormatSupportTest/18 (source) FAIL: the stylesheet is not served with a text/css Content-Type and not valid CSS.

CONTENT_FORMAT_SUPPORT:

  • FAIL: The document is served as "text/css", instead of one of "application/xhtml+xml", "application/vnd.wap.xhtml+xml", or "text/html" [CONTENT_FORMAT_SUPPORT-1]
  • FAIL: The external CSS stylesheet is not syntactically valid CSS [CONTENT_FORMAT_SUPPORT-11]
ContentFormatSupportTest/19 (source) FAIL: the stylesheet is not served with a text/css Content-Type.

CONTENT_FORMAT_SUPPORT:

  • FAIL: The document is served as "text/css", instead of one of "application/xhtml+xml", "application/vnd.wap.xhtml+xml", or "text/html" [CONTENT_FORMAT_SUPPORT-1]
ContentFormatSupportTest/20 (source) FAIL: the image and the objects are not valid GIF images.

CONTENT_FORMAT_SUPPORT:

ContentFormatSupportTest/21 (source) PASS: the page validates against the XHTML MP 1.2 DTD, but not agains the XHTML Basic 1.1 DTD.

CONTENT_FORMAT_SUPPORT: PASS

ContentFormatSupportTest/22 (source) FAIL: the image and the objects are not valid GIF images.

CONTENT_FORMAT_SUPPORT:

  • FAIL: The document is served as "text/css", instead of one of "application/xhtml+xml", "application/vnd.wap.xhtml+xml", or "text/html" [CONTENT_FORMAT_SUPPORT-1]
  • WARN: The document is not valid to its stated doctype: Attribute "lang" is not allowed for element type "html". [CONTENT_FORMAT_SUPPORT-13]
  • WARN: The document is not valid to its stated doctype: Attribute "src" is required and must be specified for element type "img". [CONTENT_FORMAT_SUPPORT-13]
  • WARN: The document is not valid to its stated doctype: Element "unknown" is not allowed. [CONTENT_FORMAT_SUPPORT-13]
  • WARN: The document is not valid to its stated doctype: The content of element type "body" must match "(h1 h2 h3 h4 h5 h6 ul ol dl p div pre blockquote address hr table form fieldset script noscript)+". [CONTENT_FORMAT_SUPPORT-13]
  • FAIL: The document does not validate against the XHTML Basic 1.1 DTD nor MP 1.2: Attribute "lang" is not allowed for element type "html". [CONTENT_FORMAT_SUPPORT-6]
  • FAIL: The document does not validate against the XHTML Basic 1.1 DTD nor MP 1.2: Attribute "src" is required and must be specified for element type "img". [CONTENT_FORMAT_SUPPORT-6]
  • FAIL: The document does not validate against the XHTML Basic 1.1 DTD nor MP 1.2: Element "unknown" is not allowed. [CONTENT_FORMAT_SUPPORT-6]
  • FAIL: The document does not validate against the XHTML Basic 1.1 DTD nor MP 1.2: The content of element type "body" must match "(h1 h2 h3 h4 h5 h6 ul ol dl p div pre blockquote address hr table form fieldset script noscript)+". [CONTENT_FORMAT_SUPPORT-6]

DEFAULT_INPUT_MODE

3.5 DEFAULT_INPUT_MODE

Note:

inputmode is part of [XHTMLBasic11].

For each input element with attribute type whose value is "text" or "password" or whose type attribute is missing:

If the element's inputmode attribute is invalid according to Section 5.2 User Agent Behavior of XHTML Basic 1.1 [XHTMLBasic11], FAIL

If the element's value attribute is missing or empty, and an inputmode attribute is not present, warn

For each textarea element:

If the element's inputmode attribute is invalid according to Section 5.2 User Agent Behavior of XHTML Basic 1.1 [XHTMLBasic11], FAIL

If the element is empty and an inputmode attribute is not present, warn

Test caseDescriptionChecker result
DefaultInputModeTest/1 (source) Valid use of the inputmode attribute (Pass)

DEFAULT_INPUT_MODE: PASS

DefaultInputModeTest/2 (source) FAIL: The value of the inputmode attribute is invalid (its secoond token is missing a 'U')

DEFAULT_INPUT_MODE:

DefaultInputModeTest/3 (source) WARN: this input lacks an inputmode attribute and its value attribute is empty

DEFAULT_INPUT_MODE:

DefaultInputModeTest/4 (source) PASS: This input element lacks an input mode value, but it has a non-empty value

DEFAULT_INPUT_MODE: PASS

DefaultInputModeTest/5 (source) PASS: this textarea contains a valid inputmode attribute, even though its value is empty

DEFAULT_INPUT_MODE: PASS

DefaultInputModeTest/6 (source) WARN: this textarea lacks an inputmode attribute and its text() is empty

DEFAULT_INPUT_MODE:

DefaultInputModeTest/7 (source) WARN: this input (with no type attribute) lacks an inputmode attribute and its value attribute is empty

DEFAULT_INPUT_MODE:

EXTERNAL_RESOURCES

3.6 EXTERNAL_RESOURCES

Note:

In the following, include in the count only those objects retrieved under the 3.15.1 Object Element Processing Rule whose type attribute is not specified, and those whose content type is either "image/jpeg" or "image/gif" irrespective of whether the type attribute is specified.

Retrieve the resource under test, and add the number of retrievals required to obtain the resource (see 2.4.3 HTTP Response) to a running total.

For each unique included resource, as defined in 2.4.6 Included Resources:

Request the referenced resource

Add the number of HTTP requests that are required to retrieve the resource (see 2.4.3 HTTP Response) to the running total.

If the total exceeds 10, warn

If this total exceeds 20, FAIL

Test caseDescriptionChecker result
ExternalResourcesTest/1 (source) FAIL: This document contains references to over 20 different resources

EXTERNAL_RESOURCES:

ExternalResourcesTest/2 (source) WARN: This document references over 10 different external resources, but it does not exceed 20

EXTERNAL_RESOURCES:

ExternalResourcesTest/3 (source) PASS: this document contains less than 10 references to external resources

EXTERNAL_RESOURCES: PASS

ExternalResourcesTest/4 (source) PASS: A single small image is loaded a lot of times (both as object and image).

EXTERNAL_RESOURCES: PASS

ExternalResourcesTest/5 (source) PASS: 20 different objects but only the first one is rendered, whilst the other ones are skipped.

EXTERNAL_RESOURCES: PASS

ExternalResourcesTest/6 (source) WARN: 10 different images + the resource under test

EXTERNAL_RESOURCES:

ExternalResourcesTest/7 (source) WARN: 11 different background images defined in the CSS (+ the resource under test).

EXTERNAL_RESOURCES:

ExternalResourcesTest/8 (source) WARN: 1 stylesheet + 8 other stylesheets + 1 other stylesheet + resource under test = 11 resources

EXTERNAL_RESOURCES:

ExternalResourcesTest/9 (source) PASS: 1 stylesheet + 8 other stylesheets + resource under test = 10 resources

EXTERNAL_RESOURCES: PASS

ExternalResourcesTest/10 (source) PASS: 9 different images among which one image appears twice + the resource under test

EXTERNAL_RESOURCES: PASS

ExternalResourcesTest/11 (source) PASS: only objects retrieved under the Object Processing rule with no type attribute and those whose Content-Type is image/jpeg or image/gif are taken into account.

EXTERNAL_RESOURCES: PASS

ExternalResourcesTest/12 (source) WARN: all objects retrieved under the Object Processing rule with no type attribute and those whose Content-Type is image/jpeg or image/gif are taken into account.

EXTERNAL_RESOURCES:

GRAPHICS_FOR_SPACING

3.7 GRAPHICS_FOR_SPACING

The intent of this Best Practice is to avoid using transparent images for spacing. However, small transparent images are often used in e-commerce sites for user tracking purposes. The practice is common enough, and possibly vital enough to the business interests of mobile sites, that it is undesirable to fail sites that use such small transparent images. Therefore this machine-testable test merely warns about the presence of small (at most 2x2) transparent images and FAILs larger ones. It is believed that few if any sites would use transparent images of any significant size for tracking.

For each img element and object element which when retrieved has an Internet media type that starts with "image/":

If all pixels are transparent,

If image height and width are both less than or equal to 2 pixels, warn

If either dimension exceeds 2 pixels, FAIL

If more than one image with all transparent pixels was encountered, warn

Test caseDescriptionChecker result
GraphicsForSpacingTest/1 (source) FAIL: this is a reference to an image that doesn't exist in this directory and therefore has a retrieval error FAIL: this is a transparent image that exceeds the 2x2 limit WARN: this is a small transparent image"

GRAPHICS_FOR_SPACING:

  • FAIL: The HTTP status code is 404 or 5xx (in response to the resource http://localhost:8080/GraphicsForSpacingTest/1/SMILE.jpg) and the response relates to a request for an included resource [HTTP_RESPONSE-10]
  • FAIL: There is a bigger than 2 pixels transparent image [GRAPHICS_FOR_SPACING-2]
  • WARN: There is a small fully transparent image [GRAPHICS_FOR_SPACING-1]
  • WARN: There are more than one fully transparent images [GRAPHICS_FOR_SPACING-3]
GraphicsForSpacingTest/2 (source) WARN: this is a tiny 2x2 transparent image

GRAPHICS_FOR_SPACING:

GraphicsForSpacingTest/3 (source) PASS: this document contains no transparent images

GRAPHICS_FOR_SPACING: PASS

GraphicsForSpacingTest/4 (source) FAIL: This document contains a transparent image that exceeds 2x2 pixels

GRAPHICS_FOR_SPACING:

GraphicsForSpacingTest/5 (source) WARN: only the 2x2 transparent image should be tested, the large ones are not Included Resources

GRAPHICS_FOR_SPACING:

IMAGE_MAPS

3.8 IMAGE_MAPS

If an input element with type attribute set to "image" is present, FAIL

For each img element and object element:

If a usemap attribute is present, FAIL

If an ismap attribute is present, FAIL

Test caseDescriptionChecker result
ImageMapsTest/1 (source) FAIL: this image contains a usemap attribute

IMAGE_MAPS:

ImageMapsTest/2 (source) FAIL: this object contains an ismap attribute

IMAGE_MAPS:

ImageMapsTest/3 (source) FAIL: this page contains an input element with a type attribute equal to "image"

IMAGE_MAPS:

  • FAIL: An input element with type attribute set to "image" is present [IMAGE_MAPS-1]
ImageMapsTest/4 (source) FAIL: an input element is defined with type "image" Note that the "ismap" attributes defined on the objects and images don't trigger any FAIL, because they are defined on resources that are not Included Resources

IMAGE_MAPS:

  • FAIL: An input element with type attribute set to "image" is present [IMAGE_MAPS-1]

IMAGES_SPECIFY_SIZE

3.9 IMAGES_RESIZING and IMAGES_SPECIFY_SIZE

Note:

The height and width HTML attributes specify pixels when they are used as a number. No unit is specified.

For each img element and object element whose type attribute starts with "image/":

If the height or width attribute are missing, FAIL

If the height or width attribute do not specify a size in pixels, FAIL

If the value specified by either the height or width attribute is greater than the corresponding dimension of the image, warn

If the value specified by either the height or width attribute is less than the corresponding dimension of the image, FAIL

Test caseDescriptionChecker result
ImagesSpecifySizeTest/1 (source) FAIL: this image is missing its height attribute

IMAGES_SPECIFY_SIZE:

ImagesSpecifySizeTest/2 (source) FAIL: this image's height attribute contains a value that is not specified in pixels

IMAGES_SPECIFY_SIZE:

ImagesSpecifySizeTest/3 (source) 2 FAIL: the width of this image is not recognized as being as number and then generates the error that this "not a number" is less than the real width of the picture WARN: the height specified is bigger than the image's real height

IMAGES_SPECIFY_SIZE:

ImagesSpecifySizeTest/4 (source) WARN: both the height and width of this image are specified at sizes far larger than its actual size

IMAGES_SPECIFY_SIZE:

  • WARN: the height or width specified is greater than the corresponding dimension of the image [IMAGES_SPECIFY_SIZE-3]
ImagesSpecifySizeTest/5 (source) FAIL: both the height and width specified are smaller than the image's actual dimensions

IMAGES_SPECIFY_SIZE:

  • FAIL: the height or width specified is less than the correseponding dimension of the image [IMAGES_SPECIFY_SIZE-4]
ImagesSpecifySizeTest/6 (source) Pass: an image properly marked up.

IMAGES_SPECIFY_SIZE: PASS

ImagesSpecifySizeTest/7 (source) If the HTTP status indicates that authentication is required (e.g. status code 401): If the response relates to a request for the resource under test, or any of its included resources (see 2.4.6 Included Resources): If authentication information was supplied in the HTTP request (i.e. authentication failed), FAIL [HTTP_RESPONSE_7]

IMAGES_SPECIFY_SIZE:

  • FAIL: The HTTP status (in response to the resource http://localhost:8080/ImagesSpecifySizeTest/7/gif401.gif) indicates that authentication is required (status code 401) [HTTP_RESPONSE-7]
ImagesSpecifySizeTest/8 (source) FAIL: this image (whose uri proper resolution depends on a <base href>) doesn't have the right dimensions set in the markup.

IMAGES_SPECIFY_SIZE:

  • FAIL: the height or width specified is less than the correseponding dimension of the image [IMAGES_SPECIFY_SIZE-4]
ImagesSpecifySizeTest/9 (source) FAIL: this image (whose uri proper resolution depends on resolving the URI after a redirect) doesn't have the right dimensions set in the markup.

IMAGES_SPECIFY_SIZE:

  • FAIL: the height or width specified is less than the correseponding dimension of the image [IMAGES_SPECIFY_SIZE-4]
ImagesSpecifySizeTest/10 (source) PASS: the checker does not check all images only those that are "Included Resources"

IMAGES_SPECIFY_SIZE: PASS

ImagesSpecifySizeTest/11 (source) PASS: The test should only be applied to Included Resources

IMAGES_SPECIFY_SIZE: PASS

ImagesSpecifySizeTest/12 (source) WARN: one of the dimensions is greater than the actual dimension of the image.

IMAGES_SPECIFY_SIZE:

  • WARN: the height or width specified is greater than the corresponding dimension of the image [IMAGES_SPECIFY_SIZE-3]
ImagesSpecifySizeTest/13 (source) FAIL: the dimensions of the objects are set lower than its actual dimensions. WARN: and greater in another instance

IMAGES_SPECIFY_SIZE:

  • WARN: the height or width specified is greater than the corresponding dimension of the image [IMAGES_SPECIFY_SIZE-3]
  • FAIL: the height or width specified is less than the correseponding dimension of the image [IMAGES_SPECIFY_SIZE-4]

LINK_TARGET_FORMAT

3.10 LINK_TARGET_FORMAT

Note:

404 and 5xx HTTP status do not result in failure when conducting this test.

Note:

The document body of linked resources is not examined.

For each linked resource, as defined in 2.4.7 Linked Resources:

Request the resource

If the Content-Type header value of the HTTP response is not one of the Internet Media Types listed in the Accept header in 2.4.2 HTTP Request, warn

If the Content-Type header value of the HTTP response does not specify a charset parameter, or does but it is not consistent with the value of the Accept-Charset header in 2.4.2 HTTP Request, warn

For each document internal reference (links in the document under test that refer to the document itself):

If there is no target for the reference or it is invalid (e.g. '#'), warn

Test caseDescriptionChecker result
LinkTargetFormatTest/1 (source) WARN: An internal link doesn't have a matching anchor.

LINK_TARGET_FORMAT:

LinkTargetFormatTest/2 (source) WARN: There is a link to a PNG image.

LINK_TARGET_FORMAT:

  • WARN: The linked resource http://localhost:8080/LinkTargetFormatTest/2/holycow.png is in a format (image/png) that may not be appropriate for a mobile device [LINK_TARGET_FORMAT-1]
LinkTargetFormatTest/3 (source) WARN: there is a link to a non-UTF-8 resource.

LINK_TARGET_FORMAT:

  • WARN: The linked resource http://localhost:8080/LinkTargetFormatTest/3/isolatin1.html is served with a character encoding (iso-8859-1) that may not be appropriate for a mobile device [LINK_TARGET_FORMAT-2]
LinkTargetFormatTest/4 (source) WARN: A link triggered a 404.

LINK_TARGET_FORMAT:

  • WARN: The HTTP status code is 404 or 5xx (in response to the resource http://localhost:8080/LinkTargetFormatTest/4/index2.html?foo=bar&foo3.x=0&foo3.y=0&foo3=bar3&foo2=bar2) and the response relates to a request for a linked resource [HTTP_RESPONSE-9]
LinkTargetFormatTest/5 (source) WARN: The HTTP status code is 404 or 5xx and the response relates to a request for a linked resource [HTTP_RESPONSE-9]

LINK_TARGET_FORMAT:

  • WARN: The linked resource http://www.w3c.es/HTTP_RESPONSE-9.html is served with a character encoding (iso-8859-1) that may not be appropriate for a mobile device [LINK_TARGET_FORMAT-2]
  • WARN: The HTTP status code is 404 or 5xx (in response to the resource http://www.w3c.es/HTTP_RESPONSE-9.html) and the response relates to a request for a linked resource [HTTP_RESPONSE-9]
LinkTargetFormatTest/6 (source) WARN: The HTTP status indicates that authentication is required (e.g. status code 401) and the response relates to a request for a linked resource [HTTP_RESPONSE-12]

LINK_TARGET_FORMAT:

  • WARN: The HTTP status indicates that authentication is required (status code 401) in response to the resource http://localhost:8080/LinkTargetFormatTest/6/index401.xhtml [HTTP_RESPONSE-12]
LinkTargetFormatTest/7 (source) WARN: The response is an HTTPS response and the certificate has expired:[HTTP_RESPONSE-3]

LINK_TARGET_FORMAT:

  • WARN: The linked resource https://localhost:8443/LinkTargetFormatTest/7/https.xhtml is served with a character encoding ("") that may not be appropriate for a mobile device [LINK_TARGET_FORMAT-2]
  • WARN: The response to the resource https://localhost:8443/LinkTargetFormatTest/7/https.xhtml is an HTTPS response and the certificate has expired [HTTP_RESPONSE-3]

MAIN_DOCUMENT

Test caseDescriptionChecker result
MainDocumentTest/1 (source) WARN: A matching HTTP response header does not exist for a meta http-equiv

MAIN_DOCUMENT:

  • WARN: A matching HTTP response header does not exist for a meta http-equiv=refresh [META_HTTP_EQUIV-1]
MainDocumentTest/2 (source) FAIL: The HTTP status (in response to the resource PLACEHOLDER_1)indicates redirection (status code 3xx) and there is no HTTP Location header

MAIN_DOCUMENT:

  • FAIL: The HTTP status (in response to the resource http://localhost:8080/MainDocumentTest/2/index.xhtml) indicates redirection (status code 3xx) and there is no HTTP Location header [HTTP_RESPONSE-4]
MainDocumentTest/3 (source) WARN: The HTTP status (in response to the resource PLACEHOLDER_1)indicates redirection (status code 3xx) and the URI identified by the HTTP Location header is a relative URI

MAIN_DOCUMENT:

  • WARN: The HTTP status (in response to the resource http://localhost:8080/MainDocumentTest/3/index.xhtml) indicates redirection (status code 3xx) and the URI identified by the HTTP Location header is a relative URI [HTTP_RESPONSE-5]
MainDocumentTest/4 (source) HTTP_RESPONSE-8 WARN: The HTTP status code is 404 or 5xx (in response to the resource PLACEHOLDER_1) and the response relates to a request for the resource under test

MAIN_DOCUMENT:

  • WARN: The HTTP status code is 404 or 5xx (in response to the resource http://localhost:8080/MainDocumentTest/4/index.xhtml) and the response relates to a request for the resource under test [HTTP_RESPONSE-8]
MainDocumentTest/5 (source) HTTP_RESPONSE-11 FAIL: The the HTTP status represents failure (4xx), other than 404 or a request for authentication (e.g. 401), (in response to the resource PLACEHOLDER_1)

MAIN_DOCUMENT:

  • FAIL: The the HTTP status represents failure (4xx), other than 404 or a request for authentication (e.g. 401), (in response to the resource http://localhost:8080/MainDocumentTest/5/index.xhtml) [HTTP_RESPONSE-11]
MainDocumentTest/6 (source) PASS (URIs are dereferenced using the base href).

MAIN_DOCUMENT: PASS

MainDocumentTest/7 (source) HTTP_RESPONSE-7 FAIL: If the HTTP status indicates that authentication is required (e.g. status code 401): and the response relates to a request for the resource under test, or any of its included resources and the authentication information was supplied in the HTTP request (i.e. authentication failed)

MAIN_DOCUMENT:

  • FAIL: The HTTP status (in response to the resource http://localhost:8080/MainDocumentTest/7/index.xhtml) indicates that authentication is required (status code 401) [HTTP_RESPONSE-7]
MainDocumentTest/8 (source) WARN: WARN: A matching HTTP response header exists but its value differs from the content attribute value [META_HTTP_EQUIV_2]

MAIN_DOCUMENT:

  • WARN: A matching HTTP response header (content-type) exists but its value differs from the content attribute value [META_HTTP_EQUIV-2]

MEASURES

3.11 MEASURES

Note:

The intrinsic size of images must be specified as attributes of the img element and not as CSS properties (see 3.9 IMAGES_RESIZING and IMAGES_SPECIFY_SIZE)

Note:

Only CSS Level 1 properties are considered in this test.

For each CSS Level 1 property in the CSS Style ( 2.4.5 CSS Style) whose value is a numeric measure of length stated together with a unit:

If the value is non-zero and the unit is not "em" or "ex" (and the value is not a percentage), and the property is not a margin, border or padding box property, FAIL

Test caseDescriptionChecker result
MeasuresTest/1 (source) FAIL: A linked style sheet (through the XML PI) includes CSS lenths in absolute units.

MEASURES:

  • FAIL: A length property uses an absolute unit [MEASURES-1]
MeasuresTest/2 (source) FAIL: This test cases uses embedded style sheets with absolute units. (The last embedded style sheet won't matter since it uses a non-mobile media).

MEASURES:

  • FAIL: A length property uses an absolute unit [MEASURES-1]
  • FAIL: A length property uses an absolute unit [MEASURES-1]
MeasuresTest/3 (source) FAIL: This test cases uses inline style sheets with absolute units.

MEASURES:

  • FAIL: A length property uses an absolute unit [MEASURES-1]
MeasuresTest/4 (source) FAIL: This test cases uses embedded and inline style sheets, one of which uses absolute units.

MEASURES:

  • FAIL: A length property uses an absolute unit [MEASURES-1]
MeasuresTest/5 (source) FAIL: This test cases uses a linked style sheet which uses absolute units.

MEASURES:

  • FAIL: A length property uses an absolute unit [MEASURES-1]
MeasuresTest/6 (source) Test that CSS case-insensitivity and spaces are taken into account FAIL: a CSS rule uses an absolute unit: font-size: 12pt

MEASURES:

  • FAIL: A length property uses an absolute unit [MEASURES-1]
MeasuresTest/7 (source) Ensures that the MEASURES test only applies on CSS Level 1 properties (not taking into account border, margin, and padding properties and those whose values cannot be numeric measures of length) FAIL: absolute unit for the font-size property FAIL: absolute unit for the font property (font-size part) FAIL: absolute unit for the font property (line-height part) FAIL: absolute unit for the word-spacing property FAIL: absolute unit for the letter-spacing property FAIL: absolute unit for the text-indent property FAIL: absolute unit for the line-height property FAIL: absolute unit for the width property FAIL: absolute unit for the height property

MEASURES:

  • FAIL: A length property uses an absolute unit [MEASURES-1]
  • FAIL: A length property uses an absolute unit [MEASURES-1]
  • FAIL: A length property uses an absolute unit [MEASURES-1]
  • FAIL: A length property uses an absolute unit [MEASURES-1]
  • FAIL: A length property uses an absolute unit [MEASURES-1]
  • FAIL: A length property uses an absolute unit [MEASURES-1]
  • FAIL: A length property uses an absolute unit [MEASURES-1]
  • FAIL: A length property uses an absolute unit [MEASURES-1]

MINIMIZE

3.12 MINIMIZE

Note:

Extraneous white space characters in script and in CSS are not considered in this test. Such an extension may be considered in a future revision of this specification.

Count number of white space characters (see 2.4.9 White Space) in a sequence of more than one white space character (not counting the first), which exist outside of a pre, style, script element, or XML comment

Add to this count the number of characters comprising XML comments. This total is the number of extraneous characters in the document.

Count total number of characters in document

If the number of extraneous characters exceeds 10% of the count of characters in the document, warn

If the number of extraneous characters exceeds 25% of the count of characters in the document, FAIL

Test caseDescriptionChecker result
MinimizeTest/1 (source) WARN: (exactly) More than 10% of the page characters are extraneous whitespaces.

MINIMIZE:

  • WARN: More than 10% of the page characters are extraneous (whitespaces or comments) [MINIMIZE-1]
MinimizeTest/2 (source) WARN: the page has exactly 25% of extraneous whitespace (so more than 10%, but not more than 25%)

MINIMIZE:

  • WARN: More than 10% of the page characters are extraneous (whitespaces or comments) [MINIMIZE-1]
MinimizeTest/3 (source) FAIL: (exactly) More than 25% of the page characters are extraneous whitespaces

MINIMIZE:

  • FAIL: More than 25% of the page characters are extraneous (whitespaces or comments) [MINIMIZE-2]
MinimizeTest/4 (source) WARN: More than 10% of the page characters are extraneous comments

MINIMIZE:

  • WARN: More than 10% of the page characters are extraneous (whitespaces or comments) [MINIMIZE-1]
MinimizeTest/5 (source) WARN: More than 10% of the page characters are extraneous whitespaces (inside an XML element)

MINIMIZE:

  • WARN: More than 10% of the page characters are extraneous (whitespaces or comments) [MINIMIZE-1]
MinimizeTest/6 (source) PASS: Extraneous characters in CSS aren't counted

MINIMIZE: PASS

MinimizeTest/7 (source) PASS: Extraneous characters in CSS aren't counted

MINIMIZE: PASS

NO_FRAMES

3.13 NO_FRAMES

If the document contains a frame , frameset or iframe element or it contains an object element which when retrieved has an Internet media type that starts with "text/", "application/xhtml+xml" or "application/vnd.wap.xhtml+xml", FAIL

Test caseDescriptionChecker result
NoFramesTest/1 (source) FAIL: The document contains a frameset FAIL: The document contains a frame FAIL: The document contains an iframe

NO_FRAMES:

  • FAIL: The document contains a frame, frameset or iframe element [NO_FRAMES-1]
  • FAIL: The document contains a frame, frameset or iframe element [NO_FRAMES-1]
  • FAIL: The document contains a frame, frameset or iframe element [NO_FRAMES-1]

NON_TEXT_ALTERNATIVES

3.14 NON-TEXT_ALTERNATIVES

This test does not determine whether the alternative text is meaningful.

Note:

An empty alt attribute is acceptable and signifies that there is no meaningful textual alternative, for example for images that are purely decorative.

For each img element:

If an alt attribute is not present or contains only white space, FAIL

Test caseDescriptionChecker result
NonTextAlternativesTest/1 (source) FAIL: The alt attribute is missing FAIL: The alt attribute consists only of white space

NON_TEXT_ALTERNATIVES:

NonTextAlternativesTest/2 (source) PASS: The image has an acceptable alt attribute.

NON_TEXT_ALTERNATIVES: PASS

OBJECTS_OR_SCRIPT

3.15 OBJECTS_OR_SCRIPT

This test does not determine whether the document is still usable without the objects or scripts.

If a script element is present, warn

If any element has an "intrinsic event" attribute (currently onload, onunload, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onfocus, onblur, onkeypress, onkeydown, onkeyup, onsubmit, onreset, onselect, onchange), warn

For each a and link element:

If the value of the href attribute begins with the "javascript:" scheme, FAIL

If an applet element is present, FAIL

Set the context to the root element and apply the Object Element Processing Rule

3.15.1 Object Element Processing Rule

For each object element that has no object element ancestor in this context (excepting the context node itself):

Retrieve the object (ignoring the type attribute)

If the content type of the retrieved object is not "image/jpeg" or "image/gif"

If the object element is empty, warn

If the content of the object element consists only of white space, FAIL

For each img element that has no object element ancestor in this context:

If the content type of the img element is not "image/jpeg" or "image/gif", FAIL

Reapply this rule using the current object element as the context

Test caseDescriptionChecker result
ObjectsOrScriptTest/1 (source) WARN: The document uses scripting twice (<script> elements in head and body) FAIL: A "javascript:" link is used WARN: An element uses an event attribute FAIL: The document uses an applet

OBJECTS_OR_SCRIPT:

ObjectsOrScriptTest/2 (source) WARN: an object element is empty FAIL: the content of an object element consists only of white space WARN: an object element is defined without type attribute WARN: the Content-Type of a retrieved object does not match that stated in the type attribute WARN: the Content-Type of a retrieved object is neither image/jpeg nor image/gif

OBJECTS_OR_SCRIPT:

  • WARN: The object element is empty [OBJECTS_OR_SCRIPT-5]
  • FAIL: The content of the object element consists only of white space [OBJECTS_OR_SCRIPT-6]
  • WARN: There is no type attribute [OBJECTS_OR_SCRIPT-8]
  • WARN: The Internet media type of the retrieved resource, as indicated by its Content-Type HTTP header does not match that stated in the type attribute [OBJECTS_OR_SCRIPT-9]
  • WARN: The Internet media type indicated by the Content-Type HTTP Header of the retrieved resource is not "image/jpeg" or "image/gif" [OBJECTS_OR_SCRIPT-10]
ObjectsOrScriptTest/3 (source) PASS: the PNG object has a valid GIF fallback

OBJECTS_OR_SCRIPT:

  • WARN: The Internet media type indicated by the Content-Type HTTP Header of the retrieved resource is not "image/jpeg" or "image/gif" [OBJECTS_OR_SCRIPT-10]
  • WARN: The Internet media type indicated by the Content-Type HTTP Header of the retrieved resource is not "image/jpeg" or "image/gif" [OBJECTS_OR_SCRIPT-10]
ObjectsOrScriptTest/4 (source) PASS: the fallback objects do not have to be tasted, and are ignored by the Checker. The image should be ignored as well.

OBJECTS_OR_SCRIPT: PASS

ObjectsOrScriptTest/5 (source) PASS with WARN: All objects have to be parsed, and each of them triggers at least one warning.

OBJECTS_OR_SCRIPT:

  • WARN: The Internet media type indicated by the Content-Type HTTP Header of the retrieved resource is not "image/jpeg" or "image/gif" [OBJECTS_OR_SCRIPT-10]
  • WARN: The Internet media type of the retrieved resource, as indicated by its Content-Type HTTP header does not match that stated in the type attribute [OBJECTS_OR_SCRIPT-9]
  • WARN: The Internet media type indicated by the Content-Type HTTP Header of the retrieved resource is not "image/jpeg" or "image/gif" [OBJECTS_OR_SCRIPT-10]
  • WARN: There is no type attribute [OBJECTS_OR_SCRIPT-8]
  • WARN: The Internet media type indicated by the Content-Type HTTP Header of the retrieved resource is not "image/jpeg" or "image/gif" [OBJECTS_OR_SCRIPT-10]
  • WARN: The object element is empty [OBJECTS_OR_SCRIPT-5]

PAGE_SIZE_LIMIT

3.16 PAGE_SIZE_LIMIT

Note:

In the following, include in the total only those objects retrieved under the 3.15.1 Object Element Processing Rule whose type attribute is not specified, and those whose content type is either "image/jpeg" or "image/gif" irrespective of whether the type attribute is specified.

If the size of the document exceeds 10 kilobytes, FAIL

Add the size to a running total

For each unique included resource, as defined in 2.4.6 Included Resources:

Request the referenced resource

Add the size of the response body to the running total

If the total exceeds 20 kilobytes, FAIL

Test caseDescriptionChecker result
PageSizeLimitTest/1 (source) FAIL: the main document weights more than 10 KB.

PAGE_SIZE_LIMIT:

  • FAIL: The size of the document's markup (12034 bytes) exceeds 10 kilobytes [PAGE_SIZE_LIMIT-1]
PageSizeLimitTest/2 (source) FAIL: The size of external resources makes the page weight more than 20 KB.

PAGE_SIZE_LIMIT:

  • FAIL: The total size of the page (427990 bytes) exceeds 20 kilobytes (Primary document: 428, Images: 427562, Style sheets: 0) [PAGE_SIZE_LIMIT-2]
PageSizeLimitTest/3 (source) FAIL: The size of external resources makes the page weight more than 20 KB.

PAGE_SIZE_LIMIT:

  • FAIL: The total size of the page (428056 bytes) exceeds 20 kilobytes (Primary document: 441, Images: 427562, Style sheets: 53) [PAGE_SIZE_LIMIT-2]
PageSizeLimitTest/4 (source) PASS: There is a big image, but it's not loaded since inside an object that is valid.

PAGE_SIZE_LIMIT: PASS

PageSizeLimitTest/5 (source) FAIL: Both the PNG and the GIF images needs to be loaded (since the PNG type isn't specified), makign the page too big.

PAGE_SIZE_LIMIT:

  • FAIL: The total size of the page (31267 bytes) exceeds 20 kilobytes (Primary document: 525, Images: 30742, Style sheets: 0) [PAGE_SIZE_LIMIT-2]
PageSizeLimitTest/6 (source) PASS: There is a big image, but it's not loaded since inside an object that is valid.

PAGE_SIZE_LIMIT: PASS

PageSizeLimitTest/7 (source) FAIL: The redirect page is big (24KB), and makes the total page size fail.

PAGE_SIZE_LIMIT:

  • FAIL: The total size of the page (28916 bytes) exceeds 20 kilobytes (Primary document: 529, Images: 4485, Style sheets: 0, Redirects: 23902) [PAGE_SIZE_LIMIT-2]
PageSizeLimitTest/8 (source) PASS: A single small image is loaded 20 times.

PAGE_SIZE_LIMIT: PASS

PageSizeLimitTest/9 (source) PASS: But there is an object nesting with a huge image that is not considered as an Included Resource

PAGE_SIZE_LIMIT: PASS

PAGE_TITLE

3.17 PAGE_TITLE

This test does not determine whether the title is meaningful.

If a title element is not present in the head element, or is empty, or contains only white space (see 2.4.9 White Space), FAIL

Test caseDescriptionChecker result
PageTitleTest/1 (source) FAIL: There is no title element.

PAGE_TITLE:

PageTitleTest/2 (source) FAIL: the title element is empty

PAGE_TITLE:

PageTitleTest/3 (source) FAIL: the title element consists only of whitespace.

PAGE_TITLE:

PageTitleTest/4 (source) PASS: the page title is set correctly.

PAGE_TITLE: PASS

POP_UPS

3.18 POP_UPS

For each a, link, form, and base element:

If a target attribute is present,

If its value is not one of "_self", "_parent", or "_top", FAIL

Test caseDescriptionChecker result
PopUpsTest/1 (source) PASS: no pop up is used on this page

POP_UPS: PASS

PopUpsTest/2 (source) FAIL: a pop-up is created using target="_blank" on a link.

POP_UPS:

PopUpsTest/3 (source) FAIL: A pop-up is created through the target attribute on a form.

POP_UPS:

PopUpsTest/4 (source) FAIL: Pop-up are created through the target attribute on the <base> element.

POP_UPS:

PopUpsTest/5 (source) FAIL: a pop-up is created using target="_blank" on a link.

POP_UPS:

PopUpsTest/6 (source) PASS: the target attributes on the links used authorized values.

POP_UPS: PASS

PROVIDE_DEFAULTS

3.19 PROVIDE_DEFAULTS

In addition, a human-verifiable test is needed here to verify whether such elements could be replaced with alternative control elements.

For each radio button group within a form element ( input elements with type "radio" that share the same name attribute value):

Check that exactly one input element within this group has its checked attribute set to "checked", and if this is not the case, warn

For each select element:

If there is no nested option element whose selected attribute is set to "selected", warn

If there is more than one option element whose selected attribute is set to "selected", and the multiple attribute is not set to "multiple", warn

Test caseDescriptionChecker result
ProvideDefaultsTest/1 (source) WARN: PROVIDE_DEFAULTS - No default select option

PROVIDE_DEFAULTS:

  • WARN: There is more than one input element in this group set to "checked" [PROVIDE_DEFAULTS-1]
ProvideDefaultsTest/2 (source) PASS: PROVIDE_DEFAULTS - 1 default radio

PROVIDE_DEFAULTS: PASS

ProvideDefaultsTest/3 (source) WARN: PROVIDE_DEFAULTS - Multiple default radios

PROVIDE_DEFAULTS:

  • WARN: There is more than one input element in this group set to "checked" [PROVIDE_DEFAULTS-1]
ProvideDefaultsTest/4 (source) WARN: PROVIDE_DEFAULTS - No default select option

PROVIDE_DEFAULTS:

ProvideDefaultsTest/5 (source) PASS: PROVIDE_DEFAULTS - 1 default select option

PROVIDE_DEFAULTS: PASS

ProvideDefaultsTest/6 (source) WARN: PROVIDE_DEFAULTS - Multiple default select options

PROVIDE_DEFAULTS:

STYLE_SHEETS_SUPPORT

3.20 STYLE_SHEETS_SUPPORT

In addition, a human test is needed here to verify whether the page is readable without a style sheet.

If the CSS Style ( 2.4.5 CSS Style) contains rules referencing the position, display or float properties, warn

Test caseDescriptionChecker result
StyleSheetsSupportTest/1 (source) WARN: This stylesheet contains illegal inline references to position, display and float properties

STYLE_SHEETS_SUPPORT:

  • WARN: The CSS style sheet contains rules referencing the position, display or float properties [STYLE_SHEETS_SUPPORT-1]
  • WARN: The CSS style sheet contains rules referencing the position, display or float properties [STYLE_SHEETS_SUPPORT-1]
  • WARN: The CSS style sheet contains rules referencing the position, display or float properties [STYLE_SHEETS_SUPPORT-1]
  • WARN: The CSS style sheet contains rules referencing the position, display or float properties [STYLE_SHEETS_SUPPORT-1]
StyleSheetsSupportTest/2 (source) WARN: This tests an embedded stylesheet for illegal references to position, display, and float

STYLE_SHEETS_SUPPORT:

  • WARN: The CSS style sheet contains rules referencing the position, display or float properties [STYLE_SHEETS_SUPPORT-1]
  • WARN: The CSS style sheet contains rules referencing the position, display or float properties [STYLE_SHEETS_SUPPORT-1]
  • WARN: The CSS style sheet contains rules referencing the position, display or float properties [STYLE_SHEETS_SUPPORT-1]
  • WARN: The CSS style sheet contains rules referencing the position, display or float properties [STYLE_SHEETS_SUPPORT-1]
StyleSheetsSupportTest/3 (source) WARN: this tests external stylesheets for illegal position, display, and float properties

STYLE_SHEETS_SUPPORT:

  • WARN: The CSS style sheet contains rules referencing the position, display or float properties [STYLE_SHEETS_SUPPORT-1]
  • WARN: The CSS style sheet contains rules referencing the position, display or float properties [STYLE_SHEETS_SUPPORT-1]
  • WARN: The CSS style sheet contains rules referencing the position, display or float properties [STYLE_SHEETS_SUPPORT-1]
  • WARN: The CSS style sheet contains rules referencing the position, display or float properties [STYLE_SHEETS_SUPPORT-1]
StyleSheetsSupportTest/4 (source) This test uses a style sheet with a float property used inside a css comment - this should raise no warning.

STYLE_SHEETS_SUPPORT: PASS

StyleSheetsSupportTest/5 (source) Check that CSS case-insensitivity is taken into account: WARN: The CSS Style uses position WARN: The CSS Style uses display WARN: The CSS Style uses float WARN: The CSS Style uses a non CSS Level 1 property (position)

STYLE_SHEETS_SUPPORT:

  • WARN: The CSS style sheet contains rules referencing the position, display or float properties [STYLE_SHEETS_SUPPORT-1]
  • WARN: The CSS style sheet contains rules referencing the position, display or float properties [STYLE_SHEETS_SUPPORT-1]
  • WARN: The CSS style sheet contains rules referencing the position, display or float properties [STYLE_SHEETS_SUPPORT-1]

STYLE_SHEETS_USE

3.21 STYLE_SHEETS_USE

This test looks for elements in the Text Extension module defined by [XHTMLModularization], some of which are not supported in XHTML Basic [XHTMLBasic11]. It also looks for commonly-used elements and attributes that were deprecated in HTML 4, and are not supported, or are deprecated, in XHTML Basic.

Note:

This test does not require that any CSS styles be used, since in some cases, no presentation information is required at all (for example, a simple page of text).

Note:

The tests on CSS property values only apply to properties defined by CSS Level 1; other properties are ignored for the purposes of this test.

If the document contains any basefont, bdo, center, del, dir, font, ins, menu, s, strike or u elements, FAIL

If the document contains any b, big, i, small, sub, sup or tt elements, warn

If any element has a style attribute, warn

If there is CSS Style ( 2.4.5 CSS Style)

If all styles are restricted to media types other than "handheld" or "all" by means of @media at-rules, warn

If the CSS Style contains at-rules (other than the @media at-rule, and the media list of the @import at-rule), properties, or values that are not recognized as being specified in CSS Level 1, warn

If the CSS Style contains a property with a value that is inappropriate to it, warn

If the CSS Style contains a property with a value that requires a unit or a percentage:

If the unit (or percentage) is not present, warn

If the unit (or percentage) is inappropriate to the value, warn

Test caseDescriptionChecker result
StyleSheetsUseTest/1 (source) This testcase uses the <center element (FAIL), uses a <b> element (WARN), and uses the style attribute (WARN).

STYLE_SHEETS_USE:

  • FAIL: The document contains one of basefont, bdo, center, del, dir, font, ins, menu, s, strike or u elements [STYLE_SHEETS_USE-1]
  • WARN: The documents uses one of b, big, i, small, sub, sup or tt elements [STYLE_SHEETS_USE-2]
  • WARN: The style attribute is used [STYLE_SHEETS_USE-3]
StyleSheetsUseTest/2 (source) This testcase uses the <center> element (FAIL), uses a <b> element (WARN), and uses the style attribute (WARN).

STYLE_SHEETS_USE:

  • FAIL: The document contains one of basefont, bdo, center, del, dir, font, ins, menu, s, strike or u elements [STYLE_SHEETS_USE-1]
  • WARN: The documents uses one of b, big, i, small, sub, sup or tt elements [STYLE_SHEETS_USE-2]
  • WARN: The style attribute is used [STYLE_SHEETS_USE-3]
StyleSheetsUseTest/3 (source) WARN: Embebbed style restricted by @media to screen.STYLE_SHEETS_USE-4

STYLE_SHEETS_USE:

  • WARN: All styles are restricted to CSS media types other than "handheld" or "all" [STYLE_SHEETS_USE-4]
StyleSheetsUseTest/4 (source) FAIL: Embebbed style with no suitable styles for handheld devices (a empty @media handheld).

STYLE_SHEETS_USE:

  • WARN: All styles are restricted to CSS media types other than "handheld" or "all" [STYLE_SHEETS_USE-4]
StyleSheetsUseTest/5 (source) PASS: Embebbed style with a @media handheld.

STYLE_SHEETS_USE: PASS

StyleSheetsUseTest/6 (source) FAIL: The document contains a basefont element FAIL: The document contains a bdo element FAIL: The document contains a center element FAIL: The document contains a del element FAIL: The document contains a dir element FAIL: The document contains a font element FAIL: The document contains an ins element FAIL: The document contains a menu element FAIL: The document contains an s element FAIL: The document contains a strike element FAIL: The document contains a u element

STYLE_SHEETS_USE:

  • FAIL: The document contains one of basefont, bdo, center, del, dir, font, ins, menu, s, strike or u elements [STYLE_SHEETS_USE-1]
  • FAIL: The document contains one of basefont, bdo, center, del, dir, font, ins, menu, s, strike or u elements [STYLE_SHEETS_USE-1]
  • FAIL: The document contains one of basefont, bdo, center, del, dir, font, ins, menu, s, strike or u elements [STYLE_SHEETS_USE-1]
  • FAIL: The document contains one of basefont, bdo, center, del, dir, font, ins, menu, s, strike or u elements [STYLE_SHEETS_USE-1]
  • FAIL: The document contains one of basefont, bdo, center, del, dir, font, ins, menu, s, strike or u elements [STYLE_SHEETS_USE-1]
  • FAIL: The document contains one of basefont, bdo, center, del, dir, font, ins, menu, s, strike or u elements [STYLE_SHEETS_USE-1]
  • FAIL: The document contains one of basefont, bdo, center, del, dir, font, ins, menu, s, strike or u elements [STYLE_SHEETS_USE-1]
  • FAIL: The document contains one of basefont, bdo, center, del, dir, font, ins, menu, s, strike or u elements [STYLE_SHEETS_USE-1]
  • FAIL: The document contains one of basefont, bdo, center, del, dir, font, ins, menu, s, strike or u elements [STYLE_SHEETS_USE-1]
  • FAIL: The document contains one of basefont, bdo, center, del, dir, font, ins, menu, s, strike or u elements [STYLE_SHEETS_USE-1]
  • FAIL: The document contains one of basefont, bdo, center, del, dir, font, ins, menu, s, strike or u elements [STYLE_SHEETS_USE-1]
StyleSheetsUseTest/7 (source) WARN: The document contains a b element WARN: The document contains a big element WARN: The document contains an i element WARN: The document contains a small element WARN: The document contains a sub element WARN: The document contains a sup element WARN: The document contains a tt element

STYLE_SHEETS_USE:

  • WARN: The documents uses one of b, big, i, small, sub, sup or tt elements [STYLE_SHEETS_USE-2]
  • WARN: The documents uses one of b, big, i, small, sub, sup or tt elements [STYLE_SHEETS_USE-2]
  • WARN: The documents uses one of b, big, i, small, sub, sup or tt elements [STYLE_SHEETS_USE-2]
  • WARN: The documents uses one of b, big, i, small, sub, sup or tt elements [STYLE_SHEETS_USE-2]
  • WARN: The documents uses one of b, big, i, small, sub, sup or tt elements [STYLE_SHEETS_USE-2]
  • WARN: The documents uses one of b, big, i, small, sub, sup or tt elements [STYLE_SHEETS_USE-2]
  • WARN: The documents uses one of b, big, i, small, sub, sup or tt elements [STYLE_SHEETS_USE-2]
StyleSheetsUseTest/8 (source) WARN: The CSS Style uses the unknown at-media rule "unknown" WARN: The CSS Style uses the "unknown" unknown property WARN: The CSS Style uses an unknown dimension "pints" WARN: The CSS Style uses the value "right" for the property "height" WARN: The CSS Style uses the value "ontheleft" for the property "text-align"

STYLE_SHEETS_USE:

  • WARN: The CSS Style contains at-rules (other than the @media at-rule, and the presentation media type list of the @import at-rule), properties, or values that are not recognized as being specified in CSS Level 1, or the value of a recognized CSS Level 1 property is incompatible with the property: (Sorry, the at-rule @unknown is not implemented.) [STYLE_SHEETS_USE-5]
  • WARN: The CSS Style contains at-rules (other than the @media at-rule, and the presentation media type list of the @import at-rule), properties, or values that are not recognized as being specified in CSS Level 1, or the value of a recognized CSS Level 1 property is incompatible with the property: (Property unknown doesn't exist) [STYLE_SHEETS_USE-5]
  • WARN: The CSS Style contains at-rules (other than the @media at-rule, and the presentation media type list of the @import at-rule), properties, or values that are not recognized as being specified in CSS Level 1, or the value of a recognized CSS Level 1 property is incompatible with the property: (Unknown dimension) [STYLE_SHEETS_USE-5]
  • WARN: The CSS Style contains at-rules (other than the @media at-rule, and the presentation media type list of the @import at-rule), properties, or values that are not recognized as being specified in CSS Level 1, or the value of a recognized CSS Level 1 property is incompatible with the property: (right is not a height value) [STYLE_SHEETS_USE-5]
  • WARN: The CSS Style contains at-rules (other than the @media at-rule, and the presentation media type list of the @import at-rule), properties, or values that are not recognized as being specified in CSS Level 1, or the value of a recognized CSS Level 1 property is incompatible with the property: (ontheleft is not a text-align value) [STYLE_SHEETS_USE-5]
StyleSheetsUseTest/9 (source) PASS: Some CSS style applies to all presentations.

STYLE_SHEETS_USE: PASS

StyleSheetsUseTest/10 (source) WARN: Some styles are defined, but no CSS style applies to handheld or all presentations.

STYLE_SHEETS_USE:

  • WARN: All styles are restricted to CSS media types other than "handheld" or "all" [STYLE_SHEETS_USE-4]
StyleSheetsUseTest/11 (source) WARN: some embedded CSS styles are defined and none of them applies to handheld or all presentations.

STYLE_SHEETS_USE:

  • WARN: All styles are restricted to CSS media types other than "handheld" or "all" [STYLE_SHEETS_USE-4]
StyleSheetsUseTest/12 (source) PASS: CSS embedded styles (style tag) are taken as a whole.

STYLE_SHEETS_USE: PASS

StyleSheetsUseTest/13 (source) WARN:The imported CSS should raise a STYLE_SHEETS_USE 4 Warning as is restricted to tv media (by @media rule)

STYLE_SHEETS_USE:

  • WARN: All styles are restricted to CSS media types other than "handheld" or "all" [STYLE_SHEETS_USE-4]
StyleSheetsUseTest/14 (source) WARN: The TV stylesheet only defines styles that apply to representations other than "all" or "handheld".

STYLE_SHEETS_USE:

  • WARN: All styles are restricted to CSS media types other than "handheld" or "all" [STYLE_SHEETS_USE-4]

TABLES_ALTERNATIVES

3.22 TABLES_ALTERNATIVES

If a table element exists, warn

Test caseDescriptionChecker result
TablesAlternativesTest/1 (source) WARN: there is a table.

TABLES_ALTERNATIVES:

TablesAlternativesTest/2 (source) PASS: there is no table.

TABLES_ALTERNATIVES: PASS

TABLES_LAYOUT

3.23 TABLES_LAYOUT

This test does not catch all cases where tables are used for layout purposes.

For each table element:

If it contains at most one tr element, FAIL

If no tr element contains more than one td element, FAIL

For each nested td element:

If the element contains only an image (or equivalent object) whose actual dimensions are 2x2 or less, FAIL

Test caseDescriptionChecker result
TablesLayoutTest/1 (source) FAIL: The table has only one row.

TABLES_LAYOUT:

TablesLayoutTest/2 (source) FAIL: The table has only one column.

TABLES_LAYOUT:

TablesLayoutTest/3 (source) A table where only one row has two columns, Pass.

TABLES_LAYOUT: PASS

TablesLayoutTest/4 (source) FAIL: The table contains a cell containing an image of which at least one of the actual dimensions is less than 2 px.

TABLES_LAYOUT:

  • FAIL: A table cell contains only an image whose actual dimensions are 2x2 or less [TABLES_LAYOUT-3]

TABLES_NESTED

3.24 TABLES_NESTED

For each table element:

If it contains a table element, FAIL

Test caseDescriptionChecker result
TablesNestedTest/1 (source) a table nested in another one (FAIL)

TABLES_NESTED:

TablesNestedTest/2 (source) A simple table (Pass)

TABLES_NESTED: PASS


Dominique Hazaël-Massieux

Copyright © 2008 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark, document use rules apply.