HTML 4.01 Test Suite - Assertions
Testable Assertions: Section 8 Language information and text direction
8 Language information and text direction - International considerations for text
Assertion 8.1-1
(must) lang = language-code [CI] This attribute specifies the base language of an element's attribute values and text content. The default value of this attribute is unknown.
Tests: None
Assertion 8.1-2
(must) User agents must make a best attempt to render all characters, regardless of the value specified by lang.
Assertion 8.1.1-1
(must) The lang attribute's value is a language code that identifies a natural language spoken, written, or otherwise used for the communication of information among people. Computer languages are explicitly excluded from language codes.
Tests: None
Assertion 8.1.1-2
(must) [RFC1766] defines and explains the language codes that must be used in HTML documents.Language codes consist of a primary code and a possibly empty series of subcodes e.g. "en-US": the U.S. version of English.
Tests: None
Assertion 8.1.1-3
(may) Language codes may consists empty series of subcodes.
Tests: None
Assertion 8.1.1-4
(must) Two-letter primary codes are reserved for [ISO639] language abbreviations. Two-letter codes include fr (French), de (German), it (Italian), nl (Dutch), el (Greek), es (Spanish), pt (Portuguese), ar (Arabic), he (Hebrew), ru (Russian), zh (Chinese), ja (Japanese), hi (Hindi), ur (Urdu), and sa (Sanskrit).
Tests: None
Assertion 8.1.1.5
(must) Any two-letter subcode is understood to be a [ISO3166] country code.
Tests: None
Assertion 8.1.2-1
(must) An element inherits language code information in order of precedence from highest to lowest.
Tests: None
Assertion 8.1.2-2
(may) Table cells may inherit lang values not from its parent but from the first cell in a span.
Tests: None
Assertion 8.1.3-1
(must) In the context of HTML, a language code should be interpreted by user agents as a hierarchy of tokens rather than a single token.
Tests: None
Assertion 8.2-1
(must) dir-LTR | RTl {CI}This attribute specifies the base direction of directionally neutral text. It also specifies the directionality of tables.
Tests: None
Assertion 8.2-2
(author)(may) Authors may need to specify the base directionality (left-to-right or right-to-left) of portions of a document's text, of table structure, etc. This is done with the dir attribute.
Tests: None
Assertion 8.2-4
(may) If a document does not contain a displayable right-to-left character, a conforming user agent is not required to apply the [UNICODE] bidirectional algorithm.
Tests: None
Assertion 8.2-5
(must) If a document contains right-to-left characters, and if the user agent displays these characters, the user agent must use the bidirectional algorithm.
Tests: None
Assertion 8.2-7
(must) User agents must NOT use the lang attribute to determine text directionality.
Tests: None
Assertion 8.2-8
(may) The dir attribute is inherited and may be overridden.
Tests: None
Assertion 8.2.2-1
(must) The Unicode bidirectional algorithm requires a base text direction for text blocks.
Tests: None
Assertion 8.2.2-2
(must) To specify the base direction of a block-level element, set the element's dir attribute. The default value of the dir attribute is "ltr" (left-to-right text).
Tests: None
Assertion 8.2.2-3
(must) When the dir attribute is set for a block-level element, it remains in effect for the duration of the element and any nested block-level elements. Setting the dir attribute on a nested element overrides the inherited value.
Tests: None
Assertion 8.2.2-4
(must) To set the base text direction for an entire document, set the dir attribute on the HTML element.
Tests: None
Assertion 8.2.2-5
(must) Inline elements do not inherit the dir attribute.
Tests: None
Assertion 8.2.2-6
(must) the INS and DEL elements can be block-level or inline depending on their context.)
Tests: None
Assertion 8.2.3-2
(must) To achieve additional levels of embedded direction changes, you must make use of the dir attribute on an inline element.
Tests: None
Assertion 8.2.3-3
(must) To achieve two embedded direction changes, we must supply additional information, which we do by delimiting the second embedding explicitly.
Tests: None
Assertion 8.2.3-4
(may) Authors may use special Unicode characters to achieve multiple embedded direction changes.
Tests: None
Assertion 8.2.3-5
(may) It is recommended to use either Unicode or HTML.If both methods are used, great care should be exercised to insure proper nesting of markup and directional embedding or override, otherwise, rendering results are undefined.
Tests: None
Assertion 8.2.4-1
(must) BDO element requres a Start tag and an End tag.
Tests: None
Assertion 8.2.4-2
(must) dir = LTR | RTL [CI]
This mandatory attribute specifies the base direction of the element's text content. This direction overrides the inherent directionality of characters as defined in [UNICODE].
Tests: None
Assertion 8.2.4-3
(may) some situations may arise when the bidirectional algorithm results in incorrect presentation.
Tests: None
Assertion 8.2.4-4
(may) The BDO element allows authors to turn off the bidirectional algorithm for selected fragments of text.
Tests: None
Assertion 8.2.4-5
(may) Text might be put in visual order. One reason for this may be that the MIME standard ([RFC2045], [RFC1556]) favors visual order.
Tests: None
Assertion 8.2.4-6
(author)(must) The BDO element should be used in scenarios where absolute control over sequence order is required (e.g., multi-language part numbers).
Tests: None
Assertion 8.2.4-7
(must) The dir attribute is mandatory for the BDO element.
Tests: None
Assertion 8.2.4-8
(author)(may) Authors may use special Unicode characters to override the bidirectional algorithm.
Tests: None
Assertion 8.2.5-1
(must) The [UNICODE] specification includes characters to enable their proper resolution. Also, Unicode includes some characters to control joining behavior where this is necessary.
Tests: None
Assertion 8.2.6-1
(must) When an inline element that does not have a dir attribute is transformed to the style of a block-level element by a style sheet, it inherits the dir attribute from its closest parent block element to define the base direction of the block.
Tests: None
Assertion 8.2.6-2
(should) When a block element that does not have a dir attribute is transformed to the style of an inline element by a style sheet, the resulting presentation should be equivalent, in terms of bidirectional formatting, to the formatting obtained by explicitly adding a dir attribute (assigned the inherited value) to the transformed element.
Tests: None