HTML 4.01 Test Suite - Assertions

Testable Assertions: Section 8 Language information and text direction


Valid HTML 4.01!


8 Language information and text direction - International considerations for text

Assertion 8.1-1

Reference: Section 8.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

Reference: Section 8.1
(must) User agents must make a best attempt to render all characters, regardless of the value specified by lang.
Tests: 8_1-BF-01.html

Assertion 8.1.1-1

Reference: Section 8.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

Reference: Section 8.1.1
(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

Reference: Section 8.1.1
(may) Language codes may consists empty series of subcodes.
Tests: None

Assertion 8.1.1-4

Reference: Section 8.1.1
(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

Reference: Section 8.1.1
(must) Any two-letter subcode is understood to be a [ISO3166] country code.
Tests: None

Assertion 8.1.2-1

Reference: Section 8.1.2
(must) An element inherits language code information in order of precedence from highest to lowest.
Tests: None

Assertion 8.1.2-2

Reference: Section 8.1.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

Reference: Section 8.1.3
(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.1.3-2

Reference: Section 8.1.3
(informative) When a user agent adjusts rendering according to language information, it should always favor an exact match, but should also consider matching primary codes to be sufficient.
Tests: None

Assertion 8.2-1

Reference: Section 8.2
(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

Reference: Section 8.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-3

Reference: Section 8.2
(informative) The [UNICODE] specification assigns directionality to characters and defines a (complex) algorithm for determining the proper directionality of text.
Tests: None

Assertion 8.2-4

Reference: Section 8.2
(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

Reference: Section 8.2
(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-6

Reference: Section 8.2
(informative) Although Unicode specifies special characters that deal with text direction, HTML offers higher-level markup constructs that do the same thing.
Tests: None

Assertion 8.2-7

Reference: Section 8.2
(must) User agents must NOT use the lang attribute to determine text directionality.
Tests: None

Assertion 8.2-8

Reference: Section 8.2
(may) The dir attribute is inherited and may be overridden.
Tests: None

Assertion 8.2.2-1

Reference: Section 8.2.2
(must) The Unicode bidirectional algorithm requires a base text direction for text blocks.
Tests: None

Assertion 8.2.2-2

Reference: Section 8.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

Reference: Section 8.2.2
(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

Reference: Section 8.2.2
(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

Reference: Section 8.2.2
(must) Inline elements do not inherit the dir attribute.
Tests: None

Assertion 8.2.2-6

Reference: Section 8.2.2
(must) the INS and DEL elements can be block-level or inline depending on their context.)
Tests: None

Assertion 8.2.3-1

Reference: Section 8.2.3
(informative) In general only one level of embedding can be accounted for.
Tests: None

Assertion 8.2.3-2

Reference: Section 8.2.3
(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

Reference: Section 8.2.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

Reference: Section 8.2.3
(may) Authors may use special Unicode characters to achieve multiple embedded direction changes.
Tests: None

Assertion 8.2.3-5

Reference: Section 8.2.3
(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

Reference: Section 8.2.4
(must) BDO element requres a Start tag and an End tag.
Tests: None

Assertion 8.2.4-2

Reference: Section 8.2.4
(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

Reference: Section 8.2.4
(may) some situations may arise when the bidirectional algorithm results in incorrect presentation.
Tests: None

Assertion 8.2.4-4

Reference: Section 8.2.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

Reference: Section 8.2.4
(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

Reference: Section 8.2.4
(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

Reference: Section 8.2.4
(must) The dir attribute is mandatory for the BDO element.
Tests: None

Assertion 8.2.4-8

Reference: Section 8.2.4
(author)(may) Authors may use special Unicode characters to override the bidirectional algorithm.
Tests: None

Assertion 8.2.4-9

Reference: Section 8.2.4
(informative) According to [RFC1555] and [RFC1556], there are special conventions for the use of "charset" parameter values to indicate bidirectional treatment in MIME mail, in particular to distinguish between visual, implicit, and explicit directionality. The parameter value "ISO-8859-8" denotes visual encoding, "ISO-8859-8-i" denotes implicit bidirectionality, and "ISO-8859-8-e" denotes explicit directionality.
Tests: None

Assertion 8.2.4-10

Reference: Section 8.2.4
(informative) Because HTML uses the Unicode bidirectionality algorithm, conforming documents encoded using ISO 8859-8 must be labeled as "ISO-8859-8-i". Explicit directional control is also possible with HTML, but cannot be expressed with ISO 8859-8, so "ISO-8859-8-e" should not be used.
Tests: None

Assertion 8.2.5-1

Reference: Section 8.2.5
(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.5-2

Reference: Section 8.2.5
(informative) In general, the bidirectional algorithm does not mirror character glyphs but leaves them unaffected. An exception are characters such as parentheses (see [UNICODE], table 4-7). In cases where mirroring is desired, this should be controlled with styles.
Tests: None

Assertion 8.2.6-1

Reference: Section 8.2.6
(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

Reference: Section 8.2.6
(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