From db409471768e63f9d1eaae09da60e30457958870 Mon Sep 17 00:00:00 2001 From: Jeanne Spellman Date: Thu, 2 Jun 2022 11:49:29 -0400 Subject: [PATCH 01/10] Create at-can-detect-natural-language-changes.html outcome draft - needs links to Methods --- ...t-can-detect-natural-language-changes.html | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 outcomes/at-can-detect-natural-language-changes.html diff --git a/outcomes/at-can-detect-natural-language-changes.html b/outcomes/at-can-detect-natural-language-changes.html new file mode 100644 index 00000000..39d3c06d --- /dev/null +++ b/outcomes/at-can-detect-natural-language-changes.html @@ -0,0 +1,20 @@ + + + + Outcome: Changes to Natural Language + + +
+

Outcome: Changes to Natural Language

+

Assistive technologies using text to speech can pronounce blocks of text in their natural language.

+

Good articulation aids with comprehension, and is essential for text-to-speech assistive technology to be as useful as possible. Speech synthesis using pronunciation rules for the wrong language (even one using a similar alphabet) cannot easily be understood.

+ +

This outcome relates to guideline Pronunciation of Text.

+

Methods:

+
    +
  1. HTML lang attribute indicates the language of text
  2. +
  3. User agent automatic language detection for text (not written)
  4. +
+
+ + \ No newline at end of file From 94f1fb85b425b0c21875eef52cde7e02202d5d48 Mon Sep 17 00:00:00 2001 From: Jeanne Spellman Date: Tue, 7 Jun 2022 16:14:14 -0400 Subject: [PATCH 02/10] Created new files from template Updated Index --- methods/HTML lang attribute/background.html | 36 ++++++++++++++ methods/HTML lang attribute/examples.html | 49 +++++++++++++++++++ methods/HTML lang attribute/glossary.html | 17 +++++++ methods/HTML lang attribute/index.html | 33 +++++++++++++ methods/HTML lang attribute/introduction.html | 47 ++++++++++++++++++ methods/HTML lang attribute/tests.html | 33 +++++++++++++ 6 files changed, 215 insertions(+) create mode 100644 methods/HTML lang attribute/background.html create mode 100644 methods/HTML lang attribute/examples.html create mode 100644 methods/HTML lang attribute/glossary.html create mode 100644 methods/HTML lang attribute/index.html create mode 100644 methods/HTML lang attribute/introduction.html create mode 100644 methods/HTML lang attribute/tests.html diff --git a/methods/HTML lang attribute/background.html b/methods/HTML lang attribute/background.html new file mode 100644 index 00000000..7000032b --- /dev/null +++ b/methods/HTML lang attribute/background.html @@ -0,0 +1,36 @@ + + + + Method - Background + + +
+

Background

+
+
+
+

W3C Resources

+
    +
  • {related resources}
  • +
+
+
+

Non-W3C Resources

+
    +
  • {related resources}
  • +
+
+
+

Accessibility Support

+

+

+
+
+

Assumptions

+
    +
  • [assumptions]
  • +
+
+
+ + \ No newline at end of file diff --git a/methods/HTML lang attribute/examples.html b/methods/HTML lang attribute/examples.html new file mode 100644 index 00000000..131c0700 --- /dev/null +++ b/methods/HTML lang attribute/examples.html @@ -0,0 +1,49 @@ + + + + Method - Examples + + +
+

Examples

+
+
+
    +
  • {list of examples, unless using sub-sections, then delete this list}
  • +
+
+

Passed

+
+

{Example Name}

+ {Use a copy of this section for each example if not using a bullet list of examples} +

{explanation}

+
+< 
+
+
+
+
+

Failed

+
+

{Example Name}

+ {Use a copy of this section for each example if not using a bullet list of examples} +

{explanation}

+
+< 
+
+
+
+
+

Inapplicable

+
+

{Example Name}

+ {Use a copy of this section for each example if not using a bullet list of examples} +

{explanation}

+
+< 
+
+
+
+
+ + \ No newline at end of file diff --git a/methods/HTML lang attribute/glossary.html b/methods/HTML lang attribute/glossary.html new file mode 100644 index 00000000..cec72de5 --- /dev/null +++ b/methods/HTML lang attribute/glossary.html @@ -0,0 +1,17 @@ + + + + Method - Glossary + + +
+

Glossary

+
+
+
+

[term]

+

definition

+
+
+ + \ No newline at end of file diff --git a/methods/HTML lang attribute/index.html b/methods/HTML lang attribute/index.html new file mode 100644 index 00000000..0a4bef55 --- /dev/null +++ b/methods/HTML lang attribute/index.html @@ -0,0 +1,33 @@ + + + + Method: [HTML lang attribute indicates the language of text ] | {TBD (Pronunciation)} | WCAG 3.0 + + +
+

HTML lang attribute indicates the language of text

+
+
+ + +
+
+
+

Status

+

Exploratory

+
+
+

Change Log

+
    +
  • {list of non-editorial changes by date}
  • +
+
+
+ + \ No newline at end of file diff --git a/methods/HTML lang attribute/introduction.html b/methods/HTML lang attribute/introduction.html new file mode 100644 index 00000000..81b7ea6d --- /dev/null +++ b/methods/HTML lang attribute/introduction.html @@ -0,0 +1,47 @@ + + + + Method - Introduction + + +
+

Introduction

+
+
+
+

Outcome

+

This method supports the outcome {Outcome short name}.

+
+
+

Platform

+
    +
  • {list of platform(s)}
  • +
+
+
+

Technology

+
    +
  • {List of technology(ies)}
  • +
+
+
+

Input aspects for testing

+
    +
  • [technical sources for input, such as DOM tree, Accessibility tree and CSS styling]
  • +
+
+
+

Summary

+

{Summary of how to apply this method}

+
+
+

How it solves user need

+

{Description of how method relates to the outcome}

+
+
+

When to use

+

{when the method should or should not be used}

+
+
+ + diff --git a/methods/HTML lang attribute/tests.html b/methods/HTML lang attribute/tests.html new file mode 100644 index 00000000..1b8d5289 --- /dev/null +++ b/methods/HTML lang attribute/tests.html @@ -0,0 +1,33 @@ + + + + Method - Tests + + +
+

Tests

+
+
+
+

Get Started

+

Tips or link to information for beginners in testing

+
+
+

Summary

+

[overview of the test]

+
+
+

Applicability

+

This outcome applies to any [element names] element that is [condition] and for which one of the following is true: +

+
{excluded, ignored, exception}
+
[element] +
+
+
+

Expectations

+

[detail of the expectation]

+
+
+ + \ No newline at end of file From 59f8e153900fe2dce38371441a2b4836941bb530 Mon Sep 17 00:00:00 2001 From: Jeanne Spellman Date: Tue, 7 Jun 2022 16:19:26 -0400 Subject: [PATCH 03/10] fix folder name --- .../{HTML lang attribute => html-lang-attribute}/background.html | 0 .../{HTML lang attribute => html-lang-attribute}/examples.html | 0 .../{HTML lang attribute => html-lang-attribute}/glossary.html | 0 methods/{HTML lang attribute => html-lang-attribute}/index.html | 0 .../introduction.html | 0 methods/{HTML lang attribute => html-lang-attribute}/tests.html | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename methods/{HTML lang attribute => html-lang-attribute}/background.html (100%) rename methods/{HTML lang attribute => html-lang-attribute}/examples.html (100%) rename methods/{HTML lang attribute => html-lang-attribute}/glossary.html (100%) rename methods/{HTML lang attribute => html-lang-attribute}/index.html (100%) rename methods/{HTML lang attribute => html-lang-attribute}/introduction.html (100%) rename methods/{HTML lang attribute => html-lang-attribute}/tests.html (100%) diff --git a/methods/HTML lang attribute/background.html b/methods/html-lang-attribute/background.html similarity index 100% rename from methods/HTML lang attribute/background.html rename to methods/html-lang-attribute/background.html diff --git a/methods/HTML lang attribute/examples.html b/methods/html-lang-attribute/examples.html similarity index 100% rename from methods/HTML lang attribute/examples.html rename to methods/html-lang-attribute/examples.html diff --git a/methods/HTML lang attribute/glossary.html b/methods/html-lang-attribute/glossary.html similarity index 100% rename from methods/HTML lang attribute/glossary.html rename to methods/html-lang-attribute/glossary.html diff --git a/methods/HTML lang attribute/index.html b/methods/html-lang-attribute/index.html similarity index 100% rename from methods/HTML lang attribute/index.html rename to methods/html-lang-attribute/index.html diff --git a/methods/HTML lang attribute/introduction.html b/methods/html-lang-attribute/introduction.html similarity index 100% rename from methods/HTML lang attribute/introduction.html rename to methods/html-lang-attribute/introduction.html diff --git a/methods/HTML lang attribute/tests.html b/methods/html-lang-attribute/tests.html similarity index 100% rename from methods/HTML lang attribute/tests.html rename to methods/html-lang-attribute/tests.html From 56e055b76991cc3c44d3ceb02f7b615e8981e17a Mon Sep 17 00:00:00 2001 From: Jeanne Spellman Date: Tue, 7 Jun 2022 16:39:52 -0400 Subject: [PATCH 04/10] backgrouind tab --- methods/html-lang-attribute/background.html | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/methods/html-lang-attribute/background.html b/methods/html-lang-attribute/background.html index 7000032b..50f604c1 100644 --- a/methods/html-lang-attribute/background.html +++ b/methods/html-lang-attribute/background.html @@ -11,24 +11,31 @@

Background

W3C Resources

Non-W3C Resources

Accessibility Support

-

-

+

There are differences in how assistive technologies handle unknown and invalid language tags. Some will default to the language of the page, whereas others will default to the closest ancestor with a valid lang attribute. Languages with no known pronunciation such as Latin are exempt from this method and outcome. A page written in Haryanvi can not correctly be pronounced by major screen readers. Haryanvi is not considered an accessibility supported language.

+ +

Since most assistive technologies will consistently use lang over xml:lang when both are used, violation of this method may not necessarily be a violation of the outcome. Only when there are inconsistencies between assistive technologies as to which attribute is used to determine the language does this lead to a violation of the Changes to Natural Language outcome.

Assumptions

    -
  • [assumptions]
  • +
  • The language of the page can be set by other methods than the lang attribute, for example using HTTP headers or the meta element. These methods are not supported by all assistive technologies. This method assumes that these other methods are insufficient to satisfy the outcome.
From e5257f8ad17ea6ab292460a1ea6566a683f7b178 Mon Sep 17 00:00:00 2001 From: fstrr Date: Tue, 7 Jun 2022 13:40:18 -0700 Subject: [PATCH 05/10] update introduction page --- methods/html-lang-attribute/introduction.html | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/methods/html-lang-attribute/introduction.html b/methods/html-lang-attribute/introduction.html index 81b7ea6d..5ea4f2d2 100644 --- a/methods/html-lang-attribute/introduction.html +++ b/methods/html-lang-attribute/introduction.html @@ -1,7 +1,7 @@ - Method - Introduction + HTML lang attribute indicates the language of text Method - Introduction
@@ -10,37 +10,44 @@

Introduction

Outcome

-

This method supports the outcome {Outcome short name}.

+

This method supports the outcome Changes Of Natural Language.

Platform

    -
  • {list of platform(s)}
  • +
  • All platforms that support HTML.

Technology

    -
  • {List of technology(ies)}
  • +
  • HTML

Input aspects for testing

    -
  • [technical sources for input, such as DOM tree, Accessibility tree and CSS styling]
  • +
  • CSS styling
  • +
  • DOM tree

Summary

-

{Summary of how to apply this method}

+

When authors specify the correct natural language of content, user agents, including assistive technologies, can present text more accurately. Screen readers can load the correct pronunciation rules and braille tables for languages.

How it solves user need

-

{Description of how method relates to the outcome}

+

Specifying both the natural language of the view's main content as well as any changes in language of blocks of content in that view can help:

+
    +
  • People who use screen readers or other technologies that convert text into synthetic speech;
  • +
  • People who use braille that need the correct tables to be applied to text; and
  • +
  • People with certain cognitive, language, and learning disabilities who use text-to-speech software.
  • +
+
-

When to use

-

{when the method should or should not be used}

+

When to use and what to do

+

Ensure that the HTML element has a lang attribute. The lang attribute value must use a valid language tag, for example lang="en" indicates the language as English. The attribute value must match the natural language of the page title element. Changes in language must be indicated using the lang attribute on the closest parent element.

From 2e6cf3234f1089ef44a41f1f118e9a8687700d8e Mon Sep 17 00:00:00 2001 From: fstrr Date: Tue, 7 Jun 2022 13:52:22 -0700 Subject: [PATCH 06/10] add closing dd --- methods/template/tests.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/methods/template/tests.html b/methods/template/tests.html index 1b8d5289..b3a62ce0 100644 --- a/methods/template/tests.html +++ b/methods/template/tests.html @@ -21,7 +21,7 @@

Applicability

This outcome applies to any [element names] element that is [condition] and for which one of the following is true:

{excluded, ignored, exception}
-
[element] +
[element]
From 0da4410c3d3a8fc67a532b57c316fa72f87a7bee Mon Sep 17 00:00:00 2001 From: fstrr Date: Tue, 7 Jun 2022 13:58:00 -0700 Subject: [PATCH 07/10] add closing p tag. --- methods/template/tests.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/methods/template/tests.html b/methods/template/tests.html index b3a62ce0..f9134c21 100644 --- a/methods/template/tests.html +++ b/methods/template/tests.html @@ -18,7 +18,7 @@

Summary

Applicability

-

This outcome applies to any [element names] element that is [condition] and for which one of the following is true: +

This outcome applies to any [element names] element that is [condition] and for which one of the following is true:

{excluded, ignored, exception}
[element]
From bec05b62e6dd78cac404691fcdab2a59e6f4b81a Mon Sep 17 00:00:00 2001 From: fstrr Date: Tue, 7 Jun 2022 14:20:02 -0700 Subject: [PATCH 08/10] initial commit of html lang att method tests --- methods/html-lang-attribute/tests.html | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/methods/html-lang-attribute/tests.html b/methods/html-lang-attribute/tests.html index 1b8d5289..24768905 100644 --- a/methods/html-lang-attribute/tests.html +++ b/methods/html-lang-attribute/tests.html @@ -1,7 +1,7 @@ - Method - Tests + HTML lang attribute indicates the language of text Method - Tests
@@ -10,23 +10,28 @@

Tests

Get Started

-

Tips or link to information for beginners in testing

+

To get started with testing language attributes in a web page, you'll need to inspect the code in your browser. Once the page has loaded, open up your browser's developer tools and look for the <html> element near the top of code—it should be on the second line, just after the <!doctype html> tag. Once you've found that, you need to check that it has a lang attribute that correctly indicates the main language of the page. For example, if the main language of the page is French, you would look for <html lang="fr">.

+ +

Once you've checked that the page itself is marked up correctly, you need to read the page to look for blocks of text that are in a different language. If you find a block of content in another language, use your browser's developer tools to inspect the code to check that there is a lang attribute that correctly indicates the language that the block of text is written in. Complete this check for each block of text that's in a different human language from that of the main page.

Summary

-

[overview of the test]

+

For each block of content that's in a different human language than that of its parent, ensure there is lang attribute that correctly matches the content in the block.

Applicability

-

This outcome applies to any [element names] element that is [condition] and for which one of the following is true: -

-
{excluded, ignored, exception}
-
[element] -
+

This outcome applies to any block of text that is included in the accessibility tree.

Expectations

-

[detail of the expectation]

+
+
Expectation 1:
+
For each test target, there is an ancestor with a lang attribute.
+
Expectation 2:
+
For each test target, the ancestor from expectation 1 has a lang attribute value that is a valid language tag.
+
Expectation 3:
+
For each test target, the language tag from expectation 2 matches that target's default language.
+
From e405bb5430ef291a86053aa414151f687e375e95 Mon Sep 17 00:00:00 2001 From: Jeanne Spellman Date: Tue, 7 Jun 2022 18:36:36 -0400 Subject: [PATCH 09/10] glossary updates --- methods/html-lang-attribute/glossary.html | 94 ++++++++++++++++++++++- 1 file changed, 91 insertions(+), 3 deletions(-) diff --git a/methods/html-lang-attribute/glossary.html b/methods/html-lang-attribute/glossary.html index cec72de5..4545a8ae 100644 --- a/methods/html-lang-attribute/glossary.html +++ b/methods/html-lang-attribute/glossary.html @@ -8,9 +8,97 @@

Glossary

-
-

[term]

-

definition

+

This section does not use plain language for non-technical users. The technical descriptions are precise language primarily for test tool developers.

+
+

ASCII Whitespace

+

ASCII whitespace is U+0009 TAB, U+000A LF, U+000C FF, U+000D CR, or U+0020 SPACE

+
+
+

Assistive Technology

+

Hardware and/or software that acts as a user agent, or along with a mainstream user agent, to provide functionality to meet the requirements of users with disabilities that go beyond those offered by mainstream user agents.

+
+
+

Attribute Value

+

The attribute value of a content attribute set on an HTML element is the value that the attribute gets after being parsed and computed according to specifications. It may differ from the value that is actually written in the HTML code due to trimming whitespace or non-digits characters, default values, or case-insensitivity.

+

Some notable case of attribute value, among others:

+
    +
  • For enumerated attributes, the attribute value is either the state of the attribute, or the keyword that maps to it; even for the default states. Thus has an attribute value of either Image Button (the state) or image (the keyword mapping to it), both formulations having the same meaning; similarly, "an input element with a type attribute value of Text" can be either , (missing value default), or (invalid value default).
  • +
  • For boolean attributes, the attribute value is true when the attribute is present and false otherwise. Thus
  • +
  • For attributes whose value is used in a case-insensitive context, the attribute value is the lowercase version of the value written in the HTML code.
  • +
  • For attributes that accept numbers, the attribute value is the result of parsing the value written in the HTML code according to the rules for parsing this kind of number.
  • +
  • For attributes that accept sets of tokens, whether space separated or comma separated, the attribute value is the set of tokens obtained after parsing the set and, depending on the case, converting its items to lowercase (if the set is used in a case-insensitive context).
  • +
  • For aria-* attributes, the attribute value is computed as indicated in the WAI-ARIA specification and the HTML Accessibility API Mappings.
  • +
+

This list is not exhaustive, and only serves as an illustration for some of the most common cases.

+

The attribute value of an IDL attribute is the value returned on getting it. Note that when an IDL attribute reflects a content attribute, they have the same attribute value.

+
+
+

Block of Text

+

Any natural language text, including alternative text, that starts on a new line and ends with a hard line break is a block of text. Each of the following are examples of a Block of Text: a paragraph, each item in a multi-line list, lines in a block of code, each cell in a table.

+

Any natural language text, including alternative text, that isn’t part of a larger sentence. A block of text starts on a new line and ends with the line break. Examples include paragraphs, large quotations, lists, buttons, table cells. Quotations inside a paragraph or links inside sentences are not blocks of text. A paragraph broken by a line break (
) would be two blocks of text. A poem would be a block of text for every line. A definition list could be on one line on a wide screen could be one block of text and one the narrow screen it would be two blocks of text.

+
+
+

Content Type

+

Each document has an associated encoding (an encoding), content type (a string), URL (a URL), origin (an origin), type ("xml" or "html"), and mode ("no-quirks", "quirks", or "limited-quirks"). [ENCODING] [URL] [HTML]

+

Unless stated otherwise, a document’s encoding is the utf-8 encoding, content type is "application/xml", document URL is "about:blank", document origin is an opaque origin, type is "xml", and its document mode is "no-quirks".

+

A document is said to be an XML document if its document type is "xml"; otherwise an HTML document. Whether a document is an HTML document or an XML document affects the behavior of certain APIs.

+

A document is said to be in no-quirks mode if its mode is "no-quirks", quirks mode if its document mode is "quirks", and limited-quirks mode if its document mode is "limited-quirks".

+
+
+

Default Page Language

+

The default language of a web page is the most common language of its top-level browsing context document, if it is unique. If this document has either no or several most common languages, then it has no default language.

+
+
+

Document Element

+

The document element of a document is the element whose parent is that document, if it exists; otherwise null.

+
+
+

Flat Tree

+

While Selectors operate on the DOM tree as the host language presents it, with separate trees that are unreachable via the standard parent/child relationship, the rest of CSS needs a single unified tree structure to work with. This is called the flattened element tree (or flat tree).

+
+
+

Inclusive Descendent

+

An inclusive descendant is an object or one of its descendants.

+
+
+

Natural Language

+

Natural Language (sometimes just language) refers to the spoken, written, or signed communications used by human beings. From Internationalization Glossary

+
+
+

Node Document

+

Each node has an associated node document, set upon creation, that is a document.

+
+
+

Text

+

A sequence of characters that can be programmatically determined, where the sequence is expressing something in natural language.

+
+
+

Text Inheriting its Programmatic Language from an Element

+

The text inheriting its programmatic language from an element E is composed of all the following texts: +

+

An element F is an element inheriting its programmatic language from an element E if at least one of the following conditions is true (recursively):

+
    +
  • F is E itself (an element always inherits its programmatic language from itself); or
  • +
  • F does not have a non-empty lang attribute, and is the child in the flat tree of an element inheriting its programmatic language from E; or
  • +
  • F is a fully active document element, has no non-empty lang attribute, and its browsing context container is an element inheriting its programmatic language from E.
  • +
+
+
+

Top Level Browsing Context

+

​A browsing context that has no parent browsing context is the top-level browsing context for itself and all of the browsing contexts for which it is an ancestor browsing context.

+

A top-level browsing context has an associated group (null or a browsing context group). It is initially null.

+

It is possible to create new browsing contexts that are related to a top-level browsing context while their container is null. Such browsing contexts are called auxiliary browsing contexts. Auxiliary browsing contexts are always top-level browsing contexts.

+
+
+

Valid Language Tag

+

A language tag is valid if its primary language subtag exists in the language subtag registry with a Type field whose field-body value is language.

+

A "language tag" is here to be understood as in the first paragraph of the RFC 5646 language tag syntax, i.e. a sequence of subtags separated by hyphens, where a subtag is any sequence of alphanumerical characters. Thus, this definition intentionally differs from the strict RFC 5646 syntax (and ABNF grammar) as user agents and assistive technologies are more lenient in what they accept. The definition is however consistent with the behavior of the :lang() pseudo-selector as defined by Selectors Level 3. For example, de-hello would be an accepted way to indicate German in current user agents and assistive technologies, despite not being valid according to RFC 5646 grammar. As a consequence of this definition, however, grandfathered tags are not correctly recognized as valid language subtags. +

+

Subtags, notably the primary language subtag, are case insensitive. Hence comparison with the language subtag registry must be done in a case insensitive way.

From d93dbe894dd3653778a5235846d0b127ad37078d Mon Sep 17 00:00:00 2001 From: Michael Cooper Date: Thu, 9 Jun 2022 10:41:47 -0400 Subject: [PATCH 10/10] rename outcome file for renamed title --- ...ral-language-changes.html => changes-to-natural-language.html} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename outcomes/{at-can-detect-natural-language-changes.html => changes-to-natural-language.html} (100%) diff --git a/outcomes/at-can-detect-natural-language-changes.html b/outcomes/changes-to-natural-language.html similarity index 100% rename from outcomes/at-can-detect-natural-language-changes.html rename to outcomes/changes-to-natural-language.html