From 499b506ffd9f5b85fb927276a02168d16ab430e4 Mon Sep 17 00:00:00 2001 From: Giacomo Petri Date: Thu, 16 Apr 2026 11:52:17 +0200 Subject: [PATCH 1/8] Update html-page-lang-valid-bf051a.md --- _rules/html-page-lang-valid-bf051a.md | 53 ++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 6 deletions(-) diff --git a/_rules/html-page-lang-valid-bf051a.md b/_rules/html-page-lang-valid-bf051a.md index 9d29d4aad5..d2377d3cad 100755 --- a/_rules/html-page-lang-valid-bf051a.md +++ b/_rules/html-page-lang-valid-bf051a.md @@ -21,6 +21,7 @@ input_aspects: acknowledgments: authors: - Jey Nandakumar + - Giacomo Petri previous_authors: - Annika Nietzio funding: @@ -33,7 +34,8 @@ This rule applies to any [document element](https://dom.spec.whatwg.org/#documen - has a `lang` attribute that is neither empty ("") nor only [ASCII whitespace](https://infra.spec.whatwg.org/#ascii-whitespace); and - 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][]. ## Expectation @@ -73,18 +75,39 @@ This rule is only applicable to non-embedded HTML pages. HTML pages embedded int #### Passed Example 1 -This `html` element has a `lang` attribute with a [known primary language tag][]. +This `html` element has a `lang` attribute with a [known primary language tag][] and non-empty `body` content. ```html - + + +

Amo le regole ACT!

+ + ``` #### Passed Example 2 +This `html` element has a `lang` attribute with a [known primary language tag][] and non-empty `title`. + +```html + + + Amo le regole ACT! + + + +``` + +#### Passed Example 3 + This `html` element has a `lang` attribute with a [known primary language tag][] even though the [region subtag][] is not. ```html - + + +

I love ACT rules!

+ + ``` ### Failed @@ -94,7 +117,11 @@ This `html` element has a `lang` attribute with a [known primary language tag][] This `html` element has a `lang` attribute, with no [known primary language tag][]. ```html - + + +

I love ACT rules!

+ + ``` #### Failed Example 2 @@ -102,7 +129,11 @@ This `html` element has a `lang` attribute, with no [known primary language tag] This `html` element has a `lang` attribute, with no [known primary language tag][]. ```html - + + +

I love ACT rules!

+ + ``` #### Failed Example 3 @@ -139,6 +170,16 @@ This rule does not apply to `svg` elements. ``` +#### Inapplicable Example 2 + +This rule does not apply to content that is empty or contains only [whitespace][]. + +```html + + + +``` + [grandfathered tags]: https://www.rfc-editor.org/rfc/rfc5646.html#section-2.2.8 [iso 639.2]: https://www.loc.gov/standards/iso639-2/php/code_list.php 'ISO 639.2: Codes for the Representation of Names of Languages' [region subtag]: https://www.rfc-editor.org/rfc/rfc5646.html#section-2.2.4 'Definition of region subtag' From 90831d14e33476d99690cc0529a12b6a71e3398b Mon Sep 17 00:00:00 2001 From: Giacomo Petri Date: Thu, 16 Apr 2026 11:59:04 +0200 Subject: [PATCH 2/8] Update html-page-lang-matches-default-ucwvc8.md --- _rules/html-page-lang-matches-default-ucwvc8.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/_rules/html-page-lang-matches-default-ucwvc8.md b/_rules/html-page-lang-matches-default-ucwvc8.md index 9ef0a02409..83d848f585 100755 --- a/_rules/html-page-lang-matches-default-ucwvc8.md +++ b/_rules/html-page-lang-matches-default-ucwvc8.md @@ -39,7 +39,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 +323,16 @@ The `lang` [attribute value][] of this page is a [grandfathered tag][grandfather ``` +#### Inapplicable Example 7 + +This rule does not apply to content that is empty or contains only [whitespace][]. + +```html + + + +``` + [attribute value]: #attribute-value [content type]: https://dom.spec.whatwg.org/#concept-document-content-type 'DOM content type, as of 2020/06/05' [default page language]: #default-page-language From aa2a7063a49b8be6b280e15d9485335c44922b9c Mon Sep 17 00:00:00 2001 From: Giacomo Petri Date: Thu, 16 Apr 2026 12:03:31 +0200 Subject: [PATCH 3/8] Update html-page-lang-b5c3f8.md --- _rules/html-page-lang-b5c3f8.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/_rules/html-page-lang-b5c3f8.md b/_rules/html-page-lang-b5c3f8.md index 9c841774a0..ea4ce104e8 100755 --- a/_rules/html-page-lang-b5c3f8.md +++ b/_rules/html-page-lang-b5c3f8.md @@ -32,7 +32,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 +153,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 From 3fc5a94da5c646f32227db154043597069f2ca43 Mon Sep 17 00:00:00 2001 From: Giacomo Petri Date: Thu, 16 Apr 2026 12:04:17 +0200 Subject: [PATCH 4/8] Update html-page-lang-b5c3f8.md --- _rules/html-page-lang-b5c3f8.md | 1 + 1 file changed, 1 insertion(+) diff --git a/_rules/html-page-lang-b5c3f8.md b/_rules/html-page-lang-b5c3f8.md index ea4ce104e8..0bda505328 100755 --- a/_rules/html-page-lang-b5c3f8.md +++ b/_rules/html-page-lang-b5c3f8.md @@ -21,6 +21,7 @@ input_aspects: acknowledgments: authors: - Jey Nandakumar + - Giacomo Petri previous_authors: - Annika Nietzio funding: From 7fa6b33aa10725125692026b9db486cd9b295855 Mon Sep 17 00:00:00 2001 From: Giacomo Petri Date: Thu, 16 Apr 2026 12:04:33 +0200 Subject: [PATCH 5/8] Update html-page-lang-matches-default-ucwvc8.md --- _rules/html-page-lang-matches-default-ucwvc8.md | 1 + 1 file changed, 1 insertion(+) diff --git a/_rules/html-page-lang-matches-default-ucwvc8.md b/_rules/html-page-lang-matches-default-ucwvc8.md index 83d848f585..2183d6eec9 100755 --- a/_rules/html-page-lang-matches-default-ucwvc8.md +++ b/_rules/html-page-lang-matches-default-ucwvc8.md @@ -24,6 +24,7 @@ input_aspects: acknowledgments: authors: - Wilco Fiers + - Giacomo Petri funding: - WAI-Tools htmlHintIgnore: From 0120002fd567d96000935a2a02c5bdd7f9f640e9 Mon Sep 17 00:00:00 2001 From: Giacomo Petri Date: Thu, 16 Apr 2026 12:14:25 +0200 Subject: [PATCH 6/8] Update html-page-lang-b5c3f8.md --- _rules/html-page-lang-b5c3f8.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_rules/html-page-lang-b5c3f8.md b/_rules/html-page-lang-b5c3f8.md index 0bda505328..f28988592d 100755 --- a/_rules/html-page-lang-b5c3f8.md +++ b/_rules/html-page-lang-b5c3f8.md @@ -20,8 +20,8 @@ input_aspects: - DOM Tree acknowledgments: authors: - - Jey Nandakumar - Giacomo Petri + - Jey Nandakumar previous_authors: - Annika Nietzio funding: From 259a39d49ccda4ea1ac2d177109b6661465026cd Mon Sep 17 00:00:00 2001 From: Giacomo Petri Date: Thu, 16 Apr 2026 12:14:40 +0200 Subject: [PATCH 7/8] Update html-page-lang-matches-default-ucwvc8.md --- _rules/html-page-lang-matches-default-ucwvc8.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_rules/html-page-lang-matches-default-ucwvc8.md b/_rules/html-page-lang-matches-default-ucwvc8.md index 2183d6eec9..4ced815662 100755 --- a/_rules/html-page-lang-matches-default-ucwvc8.md +++ b/_rules/html-page-lang-matches-default-ucwvc8.md @@ -23,8 +23,8 @@ input_aspects: - Language acknowledgments: authors: - - Wilco Fiers - Giacomo Petri + - Wilco Fiers funding: - WAI-Tools htmlHintIgnore: From 22859b0a6f5f83478b6cacca45530195074c6c95 Mon Sep 17 00:00:00 2001 From: Giacomo Petri Date: Thu, 16 Apr 2026 12:14:55 +0200 Subject: [PATCH 8/8] Update html-page-lang-valid-bf051a.md --- _rules/html-page-lang-valid-bf051a.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_rules/html-page-lang-valid-bf051a.md b/_rules/html-page-lang-valid-bf051a.md index d2377d3cad..79d55db3e5 100755 --- a/_rules/html-page-lang-valid-bf051a.md +++ b/_rules/html-page-lang-valid-bf051a.md @@ -20,8 +20,8 @@ input_aspects: - DOM Tree acknowledgments: authors: - - Jey Nandakumar - Giacomo Petri + - Jey Nandakumar previous_authors: - Annika Nietzio funding: