HTML conformance classes

0
The HTML standard, maintained by the Web Hypertext Application Technology Working Group (WHATWG), serves as the foundation for the web's markup language. It outlines conformance criteria for both user agents (software that renders web content) and documents (web pages and their contents). This article delves into the various conformance classes, terminologies, and how they impact different stakeholders within the web ecosystem.

Conformance Criteria for Documents

Conforming documents are those that adhere to all conformance criteria specified in the HTML standard. In some cases, these requirements are framed as directives to authors, but they implicitly apply to the documents they create. The requirements serve as guidelines to ensure the quality, consistency, and functionality of web content. For example, if an HTML specification states that "authors must not use the foobar element," it signifies that web documents should not include elements with the name "foobar."

It is essential to note that there is no inherent connection between the conformance requirements for documents and those for user agent implementations. User agents must adhere to specific processing rules, irrespective of the conformity of input documents.

User Agent Conformance Classes

User agents, the software that interprets and renders web content, fall into various conformance classes, each with its set of requirements:

Web Browsers and Interactive User Agents

  • Web browsers that support XML syntax must process HTML elements and attributes in XML documents as outlined in the HTML standard, ensuring users can interact with them.
  • Conforming web browsers execute scripts found within script elements in XML documents.
  • However, if a script element is located within an XSLT transformation, the user agent treats it as part of the transform.
  • For HTML syntax support, web browsers must process documents labeled with an HTML MIME type to enable user interaction.
  • User agents that support scripting must also implement the IDL fragments specified in the HTML standard.

Non-Interactive Presentation User Agents

  • These user agents render non-interactive versions of HTML and XML documents without user interaction.
  • Examples include printers and overhead displays.
  • Most non-interactive presentation user agents do not support scripting, but some dynamic ones may execute scripts.
  • These user agents do not need to support focus-related DOM APIs, as user interaction is absent.

Visual User Agents Supporting Default Rendering

  • User agents, whether interactive or not, may be designated as supporting the suggested default rendering defined in the HTML standard.
  • While encouraged, supporting default rendering is not mandatory.
  • User agents offering this support should provide settings for users to customize their experience.
  • When designated as supporting the suggested default rendering, user agents must adhere to the specified rendering rules.

User Agents with No Scripting Support

  • User agents lacking scripting support or disabling scripting features are exempt from supporting events and DOM interfaces.
  • They must act as if events and the DOM are supported for parts of the specification defined in terms of events and the DOM.

Conformance Checkers

Conformance checkers are tools that validate whether a document conforms to the criteria set by the HTML standard. They can be manual or automated, and they serve a crucial role in maintaining the quality and consistency of web content.
  • Conformance checkers must verify that a document adheres to the relevant conformance criteria specified in the HTML standard.
  • Automated conformance checkers are not required to detect errors that involve interpretation of author intent.
  • Checkers should ensure documents conform when parsed without a browsing context, and they may check with script execution enabled, ensuring that scripts do not cause non-conforming states other than transiently during execution.
  • The term "HTML validator" can be used for a conformance checker that aligns with the HTML standard's requirements.

Data Mining Tools

Applications and tools that process HTML and XML documents for purposes other than rendering or conformance checking should adhere to the semantics of the documents they process. Deviating from document semantics can result in non-conforming behavior, impacting data accuracy and consistency.

Authoring Tools and Markup Generators

Authoring tools, the software used to create web documents, must generate conforming documents in line with the HTML standard. They are subject to similar conformance criteria as authors, with certain allowances.
  • Authoring tools can deviate from strict element use requirements if they cannot determine author intent accurately.
  • Authoring tools must not encourage or automatically misuse elements.
  • The output of an authoring tool must conform to the same extent as that verified by a conformance checker.
  • Authoring tools are expected to come in two varieties: those based on structure or semantics and WYSIWYG (What-You-See-Is-What-You-Get) tools.
  • While structure-based tools are preferred for authoring HTML, WYSIWYG tools are legitimate if they use known appropriate elements and avoid inappropriate ones.
Tags

Post a Comment

0Comments
Post a Comment (0)