[Draft] Possible Types of Validity Errors on a Web Page

This is an attempt to exhaustively list the generic types of validity errors that can occur on Web pages. Validity errors are defined as discrepancies between the content (markup and text) of a Web page and a specification such as the Web Content Accessibility Guidelines. Please send an e-mail to shadi@w3.org if you have any additions or comments.

Context-Free Errors

The following are validity errors which do not depend on the context outside the source of the error. For example, the use of a deprecated element is an error regardless where in the page it may be.

Error Type Description of Error Example for Occurrence Requirements for Describing the Location within a Web page
Attribute missing Attribute required by the specification is not supplied A <table> element requires "title" attribute Any occurrence of the parent element that does not contain the attribute
Attribute markup invalid Attribute markup does not validate to the specification An attribute of an element does not have closing quotation marks, or attribute is deprecated Any occurrence of the parent element which contains the same markup for the attribute
Attribute value invalid Attribute value does not validate to the specification Non-decorative <img> element may not have an empty "alt" attribute Any occurrence of the parent element which contains the same value for the attribute
Element missing Element required by the specification is not supplied <!doctype> element not supplied URL to the document that does not contains the required element
Element markup invalid Element markup does not validate to the specification Element end-tag not supplied, or element is deprecated Any occurrence of the element with the same markup structure
Element value invalid Element value (i.e. content) does not validate to the specification Link text is regarded ambiguous to the target audience Any occurrence of the element with the same content

Context-Sensitive Errors

The following are validity errors which depend on the context outside the source of the error. For example, a specific order of elements may be an error even though the elements themselves might not be erroneous.

In the Context of Elements

The following are validity errors in the context of a precedent element (not necessarily of a direct parent element). For example, a context element could be any element to it's own siblings.

Error Type Description of Error Example for Occurrence Requirements for Describing the Location within a Web page
Element not allowed Element not allowed within the context element <p> element within <a> element Any occurrence of the element within any occurrence of the context element
Element attribute not allowed Element attribute not allowed within the context element "alt" attribute of an <img> element not allowed with <a> element Any occurrence of the element with the same attribute within any occurrence of the context element

In the Context of Attributes

The following are validity errors in the context of a precedent element attribute (not necessarily attribute of the direct parent element). For example, a context element attribute could be any element with a specific set of attributes to it's own siblings.

Error Type Description of Error Example for Occurence Requirements for Describing the Location within a Web page
Element not allowed Element not allowed within the context element attribute TBD Any occurrence of the element within any occurrence of the element containing the context element attribute(s)
Element attribute not allowed Element attribute not allowed within the context element attribute "alt" attribute of an <img> element not allowed with <a> element with <title> attribute Any occurrence of the element with the same attribute within any occurrence of the element containing the context element attribute(s)