diff --git a/_rules/html-page-lang-b5c3f8.md b/_rules/html-page-lang-b5c3f8.md index 9c841774a0..f28988592d 100755 --- a/_rules/html-page-lang-b5c3f8.md +++ b/_rules/html-page-lang-b5c3f8.md @@ -20,6 +20,7 @@ input_aspects: - DOM Tree acknowledgments: authors: + - Giacomo Petri - Jey Nandakumar previous_authors: - Annika Nietzio @@ -32,7 +33,8 @@ acknowledgments: This rule applies to any [document element](https://dom.spec.whatwg.org/#document-element) if it is an `html` element for which all the following are true: - is in a [top-level browsing context](https://html.spec.whatwg.org/#top-level-browsing-context); and -- has a [node document](https://dom.spec.whatwg.org/#concept-node-document) with a [content type](https://dom.spec.whatwg.org/#concept-document-content-type) of `text/html`. +- has a [node document](https://dom.spec.whatwg.org/#concept-node-document) with a [content type](https://dom.spec.whatwg.org/#concept-document-content-type) of `text/html`; and +- has at least one [descendant](https://dom.spec.whatwg.org/#concept-tree-descendant) [text node][] which is neither empty nor only [whitespace][].. **Note:** `html` elements within `iframe` and `object` elements are not applicable as `iframe` and `object` elements create [nested browsing contexts](https://html.spec.whatwg.org/#nested-browsing-context). However, as these elements are meant to provide a layer of isolation, the declared language of their [parent browsing context](https://html.spec.whatwg.org/#parent-browsing-context) will likely not be inherited, making it possible for empty `lang` attributes in [nested browsing contexts](https://html.spec.whatwg.org/#nested-browsing-context) to also cause accessibility issues. @@ -152,4 +154,14 @@ This rule does not apply to a `math` element. ``` +#### Inapplicable Example 3 + +This rule does not apply to content that is empty or contains only [whitespace][]. + +```html + +
+ +``` + [attribute value]: #attribute-value diff --git a/_rules/html-page-lang-matches-default-ucwvc8.md b/_rules/html-page-lang-matches-default-ucwvc8.md index 9ef0a02409..4ced815662 100755 --- a/_rules/html-page-lang-matches-default-ucwvc8.md +++ b/_rules/html-page-lang-matches-default-ucwvc8.md @@ -23,6 +23,7 @@ input_aspects: - Language acknowledgments: authors: + - Giacomo Petri - Wilco Fiers funding: - WAI-Tools @@ -39,7 +40,8 @@ This rule applies to any [document element][] if it is an `html` element for whi - The [document element][] has a `lang` attribute with a value that has a [known primary language tag][]; and - The [document element][] is in a [top-level browsing context][]; and - The [document element][] has a [content type][] of `text/html`; and -- The [document element][] has a defined [default page language][]. +- The [document element][] has a defined [default page language][]; and +- The [document element][] has at least one [descendant](https://dom.spec.whatwg.org/#concept-tree-descendant) [text node][] which is neither empty nor only [whitespace][]. ## Expectation @@ -322,6 +324,16 @@ The `lang` [attribute value][] of this page is a [grandfathered tag][grandfather