Skip to content

Commit

Permalink
Cjs 8.1 2 fail 3 (#136)
Browse files Browse the repository at this point in the history
* TC8.1-3-pass-1.md is ready for review

* TC08.1-3-pass-1 Added

* Add files via upload

* Add files via upload

* Update testcases.md

* Update testcases.md

* Add files via upload

* Add files via upload

* Update for testcase.md 8.1-2-fail-4

Ready for review.

* TC8.1-2-fail-4 Ready for review.

* Add files via upload

* 8.1-ic-dna-1 testcases.md ready for review

* 8.1-ic-dna-1 ready for review

* 08.1-ic-dna-1 test file ready for review

* Update testcases.md

* TC8.1-2-fail-3 is ready for review

* 08.1-2-fail-3 is ready for review

* Update TC8.1-3-fail-2.md

* remove duplicate files

* Deleting duplicate files from separate PR

* Test case and test file edits

---------

Co-authored-by: Andrew Nielson <29068131+drewnielson@users.noreply.github.com>
CJStegall and drewnielson authored May 15, 2023
1 parent 5ada32c commit d05fd80
Showing 6 changed files with 74 additions and 12 deletions.
5 changes: 3 additions & 2 deletions testcases.md
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ title: Placeholder Index of Test Cases

Until we modify the primary index file, this serves as a placeholder with links to current test case documents.

Test Case documents are organized by Baseline Test (each serving as a Test Scenario or general "functional requirement" for testing), which inculde multiple Test Cases. Will need to develop a Test Scenario template to summarize Test Scenario purpose and subordinate Test Cases
Test Case documents are organized by Baseline Test (each serving as a Test Scenario or general "functional requirement" for testing), which include multiple Test Cases. Will need to develop a Test Scenario template to summarize Test Scenario purpose and subordinate Test Cases

* `1.` Keyboard Accessible
* [Keyboard Access - Functionality not keyboard accessible (TC01.1-1-fail-1)](testcases/TC01.1-1-fail-1.html)
@@ -41,8 +41,9 @@ Test Case documents are organized by Baseline Test (each serving as a Test Scena
* `8.` Contrast
* [Contrast - Insufficient contrast ratio for small text (TC08.1-2-fail-1)](testcases/TC08.1-2-fail-1.html)
* [Contrast - Insufficient contrast ratio for 14 point font (TC08.1-2-fail-2)](testcases/TC08.1-2-fail-2.html)
* [Contrast - Contrast ratio greater than 4.5:1 (TC08.1-2-pass-1)](testcases/TC08.1-2-pass-1.html)
* [Contrast - Insufficient contrast ratio for small text, when color changes on hover/focus (TC08.1-2-fail-3)](testcases/TC08.1-2-fail-3.html)
* [Contrast - Insufficient contrast ratio for small text in an image of text (TC08.1-2-fail-4)](testcases/TC08.1-2-fail-4.html)
* [Contrast - Contrast ratio greater than 4.5:1 (TC08.1-2-pass-1)](testcases/TC08.1-2-pass-1.html)
* [Contrast - Insufficient contrast ratio for 14 point, bolded text (TC08.1-3-fail-1)](testcases/TC08.1-3-fail-1.html)
* [Contrast - Insufficient contrast ratio for 18 point font (TC08.1-3-fail-2)](testcases/TC08.1-3-fail-2.html)
* [Contrast - 3:1 Contrast Ratio for 18 point font (TC08.1-3-pass-1)](testcases/TC08.1-3-pass-1.html)
55 changes: 55 additions & 0 deletions testcases/TC08.1-2-fail-3.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: Contrast - Insufficient contrast ratio for small text, when color changes on hover/focus

# 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: TC8.1-2-fail-3

# 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 foreground and background text and size contrast ratio. Determine whether contrast ratio is sufficient. The text in the code sample provides sufficient contrast between the foreground and background in its initial state; however, the color of the heading changes on hover, which does not provide sufficient contrast ratio (2.32:1) between the text and the background.


# Reference and link to the applicable ICT Baseline test
app-baseline: |
[8.1 Test Procedure for Contrast Minimum](https://ictbaseline.access-board.gov/08Contrast/#81-test-procedure-for-contrast-minimum)
**Baseline Test ID:** 8.1-Contrast
**Test Instruction:** 1
# 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 foreground and background text and size contrast ratio in the code sample provide sufficient contrast in the initial state of the text; however, the color of the heading changes on hover, which does not provide sufficient contrast ratio (2.32:1) between the text and the background.

# 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/TF08/08.1-2-fail-3.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 |
|------------------|--------------------|---------------------------|
| Identify Content | All visible text AND images of text (except those noted in Limitations, Assumptions, or Exceptions above) | The page contains text that is 15 point, bold font |
| 8.1-1| Determine the contrast ratio of foreground text and background. | The contrast ratio for the text in its initial state is 21:1; the contrast of the text on hover is 2.32:1 |
| 8.1-2| Check that the contrast ratio is at least 4.5:1. [SC 3.14] | **FAIL:** The contrast ratio of the text on hover is less than 4.5:1 (it is 2.32:1) |
| 8.1-3| If the contrast ratio is less than 4.5:1, check that the ratio is at least 3:1 AND the font meets one of the following criteria [SC 1.4.3]: At least 18 point (23.94 pixels); At least 14 point (18.62 pixels) AND bold (at least 700 font weight) | **FAIL:** While the text is 15 point, bold font, the text on hover is less than 3:1 (it is 2.32:1) |
| Test Results | Both of the above checks fail, then Baseline Test 8.1-Contrast Minimum. | **FAIL:** Both checks fail |
8 changes: 2 additions & 6 deletions testfiles/TF08/08.1-2-fail-2.html
Original file line number Diff line number Diff line change
@@ -2,9 +2,8 @@

<html lang="en">
<head>
<title>Color Contrast Tests</title>
<title>Color Contrast Tests</title>
<style type="text/css">
/***********General*************************/
body {
height: 100%;
font-size: 14px;
@@ -26,8 +25,5 @@
<h2 style="font-size: 1.4em; color: #C0C0FF;">Text for Testing</h2>

</div>


</body>

</html>
</html>
12 changes: 12 additions & 0 deletions testfiles/TF08/08.1-2-fail-3.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en" id="tc_code">
<head>
<style>
.heading {font-size:20px;}
.heading:hover {color: violet;}
</style>
</head>
<body>
<h2 class="heading">I am heading!</h2>
</body>
</html>
3 changes: 1 addition & 2 deletions testfiles/TF08/08.1-2-fail-4.html
Original file line number Diff line number Diff line change
@@ -10,5 +10,4 @@

</div>
</body>

</html>
</html>
3 changes: 1 addition & 2 deletions testfiles/TF08/08.1-3-fail-2.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<!DOCTYPE html>

<html lang="en">
<head>
<title>Insufficient Color Contrast for 18 Point Font</title>
@@ -27,4 +26,4 @@ <h2 style="font-size: 1.8em; color: #C0C0FF;">Text for Testing</h2>

</div>
</body>
</html>
</html>

0 comments on commit d05fd80

Please sign in to comment.