Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For Language Baseline Tests 15.1 and 15.2 #85

Merged
merged 8 commits into from
Jun 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions testcases.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,15 @@ Test Case documents are organized by Baseline Test (each serving as a Test Scena
* [Contrast - insufficient contrast ratio for small text (TC08.1-2-fail-1)](testcases/TC08.1-2-fail-1.html)
* `10.` Forms
* [Input text element: no accessible name or description (TC10.1-1-fail-1)](testcases/TC10.1-1-fail-1.html)
* `15.` Language
* [Language of Page: Pass (TC15.1-all-pass-1)](testcases/TC15.1-all-pass-1.html)
* [Language of Page: not identified (TC15.1-2-fail-1)](testcases/TC15.1-2-fail-1.html)
* [Language of Page: lang attribute on wrong tag (TC15.1-2-fail-2)](testcases/TC15.1-2-fail-2.html)
* [Language of Page: invalid language subtag (TC15.1-3-fail-1)](testcases/TC15.1-3-fail-1.html)
* [Language of Page: wrong language identified (TC15.1-3-fail-2)](testcases/TC15.1-3-fail-2.html)
* [Language of Parts: Pass (TC15.2-all-pass-1)](testcases/TC15.2-all-pass-1.html)
* [Language of Parts: not identified (TC15.2-2-fail-1)](testcases/TC15.2-2-fail-1.html)
* [Language of Parts: invalid language subtag (TC15.2-3-fail-1)](testcases/TC15.2-3-fail-1.html)
* [Language of Parts: incorrect language identified (TC15.2-3-fail-2)](testcases/TC15.2-3-fail-2.html)
* [Language of Parts: Does Not Apply (TC15.2-ic-dna-1)](testcases/TC15.2-ic-dna-1.html)

55 changes: 55 additions & 0 deletions testcases/TC15.1-2-fail-1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
# The layout must be 'testcase'; DO NOT Change
layout: testcase

# Brief, descriptive title for the test case
title: Language of Page - not identified


# The Test Case ID should follow the pattern:
# TC[Baseline Test Procedure #]-[Test Instruction #]-
# [Expected Result (pass/fail/dna)]-[example #], e.g., TC05.1-1-fail-1
tcid: TC15.1-2-fail-1

# Description of the Test Case, the included code sample, test considerations,
# and rationale for the expected result according to the applicable ICT
# Baseline test
descr: |
Detect the existence of <code>lang</code> attribute for the <code>&lt;html&gt;</code> tag.

The code sample provides a page in English with no <code>lang</code> attribute on the <code>&lt;html&gt;</code> tag. A successful test should identify a FAIL for Baseline 15.1-LanguagePage.

# Reference and link to the applicable ICT Baseline test
app-baseline: |
[15.1 Test Procedure for Language of Page](https://section508coordinators.github.io/ICTTestingBaseline/15Language.html#151-test-procedure-for-language-of-page)

**Baseline Test ID:** 15.1-LanguagePage

**Test Instruction:**

# Expected result that the ICT Baseline would predict
# [Pass | Fail | DNA]
result: FAIL

# Brief description of the rationale for the expected result
result-descr: The English page's <code>&lt;html&gt;</code> tag has no <code>lang</code> attribute.

# URL for the code sample
# In the sample code file, add id="tc_code" to the
# element that contains the relevant code snippet.
#
# Then upload the code sample to the 'testfiles' folder
# and provide the link (and only the url) below.
sample: /testfiles/TF15/15.1-2-fail-1.html

# Table of test instructions, including the following table headers:
# Test Instruction #; Instruction Detail; Expected Test Case Result
#
# Include the table in the content section below
---
| Test Instruction | Instruction Detail | Expected Test Case Result |
|------------------|--------------------|---------------------------|
| **IC-1** | Pages with text (including text alternatives).| Applicable; page has text. |
| **15.1-1** | Identify the default human language of the page by reviewing the page content. The default human language of the page is the language in which most of the content is presented. | Page language is English. |
| **15.1-2** | Check that the lang attribute is defined on the `<html>` tag for the page. [SC 3.1.1] | Fail: `<html>` has no `lang` attribute |
| **Result** | If any of the above checks fail, then Baseline Test 15.1-LanguagePage fails. | Fail: 15.1-2 fails |
55 changes: 55 additions & 0 deletions testcases/TC15.1-2-fail-2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
# The layout must be 'testcase'; DO NOT Change
layout: testcase

# Brief, descriptive title for the test case
title: Language of Page - lang attribute on wrong tag


# The Test Case ID should follow the pattern:
# TC[Baseline Test Procedure #]-[Test Instruction #]-
# [Expected Result (pass/fail/dna)]-[example #], e.g., TC05.1-1-fail-1
tcid: TC15.1-2-fail-2

# Description of the Test Case, the included code sample, test considerations,
# and rationale for the expected result according to the applicable ICT
# Baseline test
descr: |
Detect the existence of <code>lang</code> attribute for the <code>&lt;html&gt;</code> tag.

The code sample provides a page in English with no <code>lang</code> attribute on the <code>&lt;html&gt;</code> tag. Instead, the <code>lang</code> attribute is on the <code>&lt;head&gt;</code> tag. A successful test should identify a FAIL for Baseline 15.1-LanguagePage.

# Reference and link to the applicable ICT Baseline test
app-baseline: |
[15.1 Test Procedure for Language of Page](https://section508coordinators.github.io/ICTTestingBaseline/15Language.html#151-test-procedure-for-language-of-page)

**Baseline Test ID:** 15.1-LanguagePage

**Test Instruction:** 2

# Expected result that the ICT Baseline would predict
# [Pass | Fail | DNA]
result: FAIL

# Brief description of the rationale for the expected result
result-descr: The English page's <code>&lt;html&gt;</code> tag has no <code>lang</code> attribute. The <code>lang</code> attribute is on the a <code>&lt;head&gt;</code> tag, which is incorrect.

# URL for the code sample
# In the sample code file, add id="tc_code" to the
# element that contains the relevant code snippet.
#
# Then upload the code sample to the 'testfiles' folder
# and provide the link (and only the url) below.
sample: /testfiles/TF15/15.1-2-fail-2.html

# Table of test instructions, including the following table headers:
# Test Instruction #; Instruction Detail; Expected Test Case Result
#
# Include the table in the content section below
---
| Test Instruction | Instruction Detail | Expected Test Case Result |
|------------------|--------------------|---------------------------|
| **IC-1** | Pages with text (including text alternatives).| Applicable; page has text. |
| **15.1-1** | Identify the default human language of the page by reviewing the page content. The default human language of the page is the language in which most of the content is presented. | Page language is English. |
| **15.1-2** | Check that the lang attribute is defined on the `<html>` tag for the page. [SC 3.1.1] | Fail: `<html>` has no `lang` attribute |
| **Result** | If any of the above checks fail, then Baseline Test 15.1-LanguagePage fails. | Fail: 15.1-2 fails |
55 changes: 55 additions & 0 deletions testcases/TC15.1-3-fail-1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
# The layout must be 'testcase'; DO NOT Change
layout: testcase

# Brief, descriptive title for the test case
title: Language of Page - invalid language subtag

# The Test Case ID should follow the pattern:
# TC[Baseline Test Procedure #]-[Test Instruction #]-
# [Expected Result (pass/fail/dna)]-[example #], e.g., TC05.1-1-fail-1
tcid: TC15.1-3-fail-1

# Description of the Test Case, the included code sample, test considerations,
# and rationale for the expected result according to the applicable ICT
# Baseline test
descr: |
Detect the existence of <code>lang</code> attribute on the <code>&lt;html&gt;</code> tag. Determine if the value of the <code>lang</code> attribute is correct for the language for the page. The value must also be identified in the Internet Assigned Numbers Authority's IANA Language subtag registry.

The code sample provides a page in English with the language for the page incorrectly identified as "eng". It should be "en". A successful test should identify a FAIL for Baseline 15.1-LanguagePage.

# Reference and link to the applicable ICT Baseline test
app-baseline: |
[15.1 Test Procedure for Language of Page](https://section508coordinators.github.io/ICTTestingBaseline/15Language.html#151-test-procedure-for-language-of-page)

**Baseline Test ID:** 15.1-LanguagePage

**Test Instruction:** 3

# Expected result that the ICT Baseline would predict
# [Pass | Fail | DNA]
result: FAIL

# Brief description of the rationale for the expected result
result-descr: The English page's <code>html</code> tag has <code>lang="eng"</code> which is an invalid language subtag.

# URL for the code sample
# In the sample code file, add id="tc_code" to the
# element that contains the relevant code snippet.
#
# Then upload the code sample to the 'testfiles' folder
# and provide the link (and only the url) below.
sample: /testfiles/TF15/15.1-3-fail-1.html

# Table of test instructions, including the following table headers:
# Test Instruction #; Instruction Detail; Expected Test Case Result
#
# Include the table in the content section below
---
| Test Instruction | Instruction Detail | Expected Test Case Result |
|------------------|--------------------|---------------------------|
| **IC-1** | Pages with text (including text alternatives).| Applicable; page has text. |
| **15.1-1** | Identify the default human language of the page by reviewing the page content. The default human language of the page is the language in which most of the content is presented. | Page language is English. |
| **15.1-2** | Check that the lang attribute is defined on the `<html>` tag for the page. [SC 3.1.1] | Pass: `<html lang="eng">` |
| **15.1-3** | Check that the value of the `lang` attribute matches the determined default human language for the page. [SC 3.1.1] | Fail: "en" is the correct language subtag for this English page |
| **Result** | If any of the above checks fail, then Baseline Test 15.1-LanguagePage fails. | Fail: 15.1-3 fails |
56 changes: 56 additions & 0 deletions testcases/TC15.1-3-fail-2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
# The layout must be 'testcase'; DO NOT Change
layout: testcase

# Brief, descriptive title for the test case
title: Language of Page - wrong language identified


# The Test Case ID should follow the pattern:
# TC[Baseline Test Procedure #]-[Test Instruction #]-
# [Expected Result (pass/fail/dna)]-[example #], e.g., TC05.1-1-fail-1
tcid: TC15.1-3-fail-2

# Description of the Test Case, the included code sample, test considerations,
# and rationale for the expected result according to the applicable ICT
# Baseline test
descr: |
Detect the existence of <code>lang</code> attribute on the <code>&lt;html&gt;</code> tag. Determine if the value of the <code>lang</code> attribute is correct for the language for the page. The value must also be identified in the Internet Assigned Numbers Authority's IANA Language subtag registry.

The code sample provides a page in English with the language for the page incorrectly identified as French. A successful test should identify a FAIL for Baseline 15.1-LanguagePage.

# Reference and link to the applicable ICT Baseline test
app-baseline: |
[15.1 Test Procedure for Language of Page](https://section508coordinators.github.io/ICTTestingBaseline/15Language.html#151-test-procedure-for-language-of-page)

**Baseline Test ID:** 15.1-LanguagePage

**Test Instruction:** 3

# Expected result that the ICT Baseline would predict
# [Pass | Fail | DNA]
result: FAIL

# Brief description of the rationale for the expected result
result-descr: The English page's <code>html</code> tag has <code>lang="fr"</code> which is not the correct value.

# URL for the code sample
# In the sample code file, add id="tc_code" to the
# element that contains the relevant code snippet.
#
# Then upload the code sample to the 'testfiles' folder
# and provide the link (and only the url) below.
sample: /testfiles/TF15/15.1-3-fail-2.html

# Table of test instructions, including the following table headers:
# Test Instruction #; Instruction Detail; Expected Test Case Result
#
# Include the table in the content section below
---
| Test Instruction | Instruction Detail | Expected Test Case Result |
|------------------|--------------------|---------------------------|
| **IC-1** | Pages with text (including text alternatives).| Applicable; page has text. |
| **15.1-1** | Identify the default human language of the page by reviewing the page content. The default human language of the page is the language in which most of the content is presented. | Page language is English. |
| **15.1-2** | Check that the lang attribute is defined on the `<html>` tag for the page. [SC 3.1.1] | Pass: `<html lang="fr">` |
| **15.1-3** | Check that the value of the `lang` attribute matches the determined default human language for the page. [SC 3.1.1] | Fail: "en" is the correct language subtag for this English page |
| **Result** | If any of the above checks fail, then Baseline Test 15.1-LanguagePage fails. | Fail: 15.1-3 fails |
56 changes: 56 additions & 0 deletions testcases/TC15.1-all-pass-1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
# The layout must be 'testcase'; DO NOT Change
layout: testcase

# Brief, descriptive title for the test case
title: Language of Page - Pass


# The Test Case ID should follow the pattern:
# TC[Baseline Test Procedure #]-[Test Instruction #]-
# [Expected Result (pass/fail/dna)]-[example #], e.g., TC05.1-1-fail-1
tcid: TC15.1-all-pass-1

# Description of the Test Case, the included code sample, test considerations,
# and rationale for the expected result according to the applicable ICT
# Baseline test
descr: |
Detect the existence of <code>lang</code> attribute on the <code>&lt;html&gt;</code> tag. Determine if the value of the <code>lang</code> attribute is correct for the language for the page. The value must also be identified in the Internet Assigned Numbers Authority's IANA Language subtag registry.

The code sample provides a page in English with the language correctly identified. A successful test should identify a PASS for Baseline 15.1-LanguagePage.

# Reference and link to the applicable ICT Baseline test
app-baseline: |
[15.1 Test Procedure for Language of Page](https://section508coordinators.github.io/ICTTestingBaseline/15Language.html#151-test-procedure-for-language-of-page)

**Baseline Test ID:** 15.1-LanguagePage

**Test Instruction:** All

# Expected result that the ICT Baseline would predict
# [Pass | Fail | DNA]
result: PASS

# Brief description of the rationale for the expected result
result-descr: The page's <code>&lt;html&gt;</code> tag has <code>lang="en"</code> correctly identified.

# URL for the code sample
# In the sample code file, add id="tc_code" to the
# element that contains the relevant code snippet.
#
# Then upload the code sample to the 'testfiles' folder
# and provide the link (and only the url) below.
sample: /testfiles/TF15/15.1-all-pass-1.html

# Table of test instructions, including the following table headers:
# Test Instruction #; Instruction Detail; Expected Test Case Result
#
# Include the table in the content section below
---
| Test Instruction | Instruction Detail | Expected Test Case Result |
|------------------|--------------------|---------------------------|
| **IC-1** | Pages with text (including text alternatives).| Applicable; page has text. |
| **15.1-1** | Identify the default human language of the page by reviewing the page content. The default human language of the page is the language in which most of the content is presented. | Page language is English. |
| **15.1-2** | Check that the `lang` attribute is defined on the `<html>` tag for the page. [SC 3.1.1] | Pass: `<html lang="en">` |
| **15.1-3** | Check that the value of the `lang` attribute matches the determined default human language for the page. [SC 3.1.1] | Pass: "en" is the correct language subtag for English |
| **Result** | If any of the above checks fail, then Baseline Test 15.1-LanguagePage fails. | All checks PASS. |
55 changes: 55 additions & 0 deletions testcases/TC15.2-2-fail-1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
# The layout must be 'testcase'; DO NOT Change
layout: testcase

# Brief, descriptive title for the test case
title: Language of Parts - not identified


# The Test Case ID should follow the pattern:
# TC[Baseline Test Procedure #]-[Test Instruction #]-
# [Expected Result (pass/fail/dna)]-[example #], e.g., TC05.1-1-fail-1
tcid: TC15.2-2-fail-1

# Description of the Test Case, the included code sample, test considerations,
# and rationale for the expected result according to the applicable ICT
# Baseline test
descr: |
Detect the existence of <code>lang</code> attribute for text (part) that differs from the default human language of the page.

The code sample provides a page in English with a part in French, with the no language identified for the French part. A successful test should identify a FAIL for Baseline 15.2-LanguagePart.

# Reference and link to the applicable ICT Baseline test
app-baseline: |
[15.2 Test Procedure for Language of Parts](https://section508coordinators.github.io/ICTTestingBaseline/15Language.html#152-test-procedure-for-language-of-parts)

**Baseline Test ID:** 15.2-LanguagePart

**Test Instruction:** 2

# Expected result that the ICT Baseline would predict
# [Pass | Fail | DNA]
result: FAIL

# Brief description of the rationale for the expected result
result-descr: The French part has no <code>lang</code> attribute.

# URL for the code sample
# In the sample code file, add id="tc_code" to the
# element that contains the relevant code snippet.
#
# Then upload the code sample to the 'testfiles' folder
# and provide the link (and only the url) below.
sample: /testfiles/TF15/15.2-2-fail-1.html

# Table of test instructions, including the following table headers:
# Test Instruction #; Instruction Detail; Expected Test Case Result
#
# Include the table in the content section below
---
| Test Instruction | Instruction Detail | Expected Test Case Result |
|------------------|--------------------|---------------------------|
| **IC-1** | Text content that differs from the default human language of the page including alternative text for non-text content.| Applicable; page has French text on an English page. |
| **15.2-1** | Identify the human language of the text content that differs from the default human language of the page. | French |
| **15.1-2** | Check that the `lang` attribute is specified for any HTML element that contains a content segment that differs from the default human language of the page. [SC 3.1.2] | Fail: French part's `<blockquote>` has no `lang` attribute |
| **Result** | If any of the above checks fail, then Baseline Test 15.1-LanguagePage fails. | Fail: 15.1-2 fails. |
Loading