From 14251c18cfdff7c565e9254b3dd5c8e887ab02f0 Mon Sep 17 00:00:00 2001 From: Wilco Fiers Date: Thu, 21 Nov 2019 14:25:28 +0100 Subject: [PATCH 1/4] Editorial changes to html-page-lang-valid --- _rules/html-page-lang-valid-bf051a.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/_rules/html-page-lang-valid-bf051a.md b/_rules/html-page-lang-valid-bf051a.md index df6a31b39f..1593e063e0 100644 --- a/_rules/html-page-lang-valid-bf051a.md +++ b/_rules/html-page-lang-valid-bf051a.md @@ -22,11 +22,11 @@ acknowledgements: This rule applies to any [document element](https://dom.spec.whatwg.org/#document-element) if it is an `html` element that: +- has a `lang` attribute that is neither empty ("") nor only [ASCII whitespace](https://infra.spec.whatwg.org/#ascii-whitespace). - 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`; and -- has a `lang` attribute that is neither empty ("") nor only [ASCII whitespace](https://infra.spec.whatwg.org/#ascii-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 non-valid `lang` attributes in [nested browsing contexts](https://html.spec.whatwg.org/#nested-browsing-context) to also cause accessibility issues. +**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 language of the [parent browsing context](https://html.spec.whatwg.org/#parent-browsing-context) may not be inherited. This should be tested separately. ## Expectation @@ -42,6 +42,8 @@ _There are no major accessibility support issues known for this rule._ ## Background +- [Understanding Success Criterion 3.1.1: Language of Page +](https://www.w3.org/WAI/WCAG21/Understanding/language-of-page.html) - [H57: Using language attributes on the html element](https://www.w3.org/WAI/WCAG21/Techniques/html/H57) - [BCP 47: Tags for Identifying Languages](https://www.ietf.org/rfc/bcp/bcp47.txt) - [MDN: `lang` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang) From 6e8022e32307d6d41c592ea74caec1f0857dc6b6 Mon Sep 17 00:00:00 2001 From: Wilco Fiers Date: Fri, 22 Nov 2019 11:04:15 +0100 Subject: [PATCH 2/4] Update html-page-lang-valid-bf051a.md --- _rules/html-page-lang-valid-bf051a.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/_rules/html-page-lang-valid-bf051a.md b/_rules/html-page-lang-valid-bf051a.md index 1593e063e0..6eb05ee45d 100644 --- a/_rules/html-page-lang-valid-bf051a.md +++ b/_rules/html-page-lang-valid-bf051a.md @@ -42,8 +42,7 @@ _There are no major accessibility support issues known for this rule._ ## Background -- [Understanding Success Criterion 3.1.1: Language of Page -](https://www.w3.org/WAI/WCAG21/Understanding/language-of-page.html) +- [Understanding Success Criterion 3.1.1: Language of Page](https://www.w3.org/WAI/WCAG21/Understanding/language-of-page.html) - [H57: Using language attributes on the html element](https://www.w3.org/WAI/WCAG21/Techniques/html/H57) - [BCP 47: Tags for Identifying Languages](https://www.ietf.org/rfc/bcp/bcp47.txt) - [MDN: `lang` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang) From 137b172ce9c007927a922232a023105dc01e9753 Mon Sep 17 00:00:00 2001 From: Wilco Fiers Date: Mon, 25 Nov 2019 14:13:57 +0100 Subject: [PATCH 3/4] add to spelling-ignore --- __tests__/spelling-ignore.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/__tests__/spelling-ignore.yml b/__tests__/spelling-ignore.yml index 8302098baa..bc982a1572 100644 --- a/__tests__/spelling-ignore.yml +++ b/__tests__/spelling-ignore.yml @@ -167,6 +167,7 @@ - H37 - H42 - H44 +- H57 - H58 - H67 - H93 From 8c7cdf1078f0e49fb2dafe580b97402cb3a53ba2 Mon Sep 17 00:00:00 2001 From: Wilco Fiers Date: Tue, 26 Nov 2019 14:46:08 +0100 Subject: [PATCH 4/4] Apply suggestions from code review Co-Authored-By: Jean-Yves Moyen Co-Authored-By: daniel-montalvo <49305434+daniel-montalvo@users.noreply.github.com> --- _rules/html-page-lang-valid-bf051a.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_rules/html-page-lang-valid-bf051a.md b/_rules/html-page-lang-valid-bf051a.md index 6eb05ee45d..fb82d50cf5 100644 --- a/_rules/html-page-lang-valid-bf051a.md +++ b/_rules/html-page-lang-valid-bf051a.md @@ -22,9 +22,9 @@ acknowledgements: This rule applies to any [document element](https://dom.spec.whatwg.org/#document-element) if it is an `html` element that: -- has a `lang` attribute that is neither empty ("") nor only [ASCII whitespace](https://infra.spec.whatwg.org/#ascii-whitespace). +- 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`; 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`. **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 language of the [parent browsing context](https://html.spec.whatwg.org/#parent-browsing-context) may not be inherited. This should be tested separately.