Skip to content

Commit

Permalink
Cjs 8.1 2 fail 2 (#132)
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

* Remove duplicate files added in other PRs

* Test case and test file edits

---------

Co-authored-by: Andrew Nielson <[email protected]>
  • Loading branch information
CJStegall and drewnielson authored May 13, 2023
1 parent 081c30e commit 5ada32c
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 0 deletions.
1 change: 1 addition & 0 deletions testcases.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Test Case documents are organized by Baseline Test (each serving as a Test Scena
* [CAPTCHA - text alternative identifies and describes purpose, and alternative forms of CAPTCHA provided for users without vision and users without hearing (TC06.3-all-pass-1)](testcases/TC06.3-all-pass-1.html)
* `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 in an image of text (TC08.1-2-fail-4)](testcases/TC08.1-2-fail-4.html)
* [Contrast - Insufficient contrast ratio for 14 point, bolded text (TC08.1-3-fail-1)](testcases/TC08.1-3-fail-1.html)
Expand Down
54 changes: 54 additions & 0 deletions testcases/TC08.1-2-fail-2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
# The layout must be 'testcase'; DO NOT Change
layout: testcase

# Brief, descriptive title for the test case
title: Contrast - Insufficient contrast ratio for 14 point, non-bold text

# 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: TC08.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 foreground and background text and size contrast ratio. Determine whether contrast ratio is sufficient. The text in the code sample does not provide sufficient contrast between the foreground and 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-ContrastMinimum
**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 foreground text in the code sample does not provide sufficient contrast (1.72:1) based on the text size (14 point), foreground color, and background color.

# 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-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 | All visible text AND images of text (except those noted in Limitations, Assumptions, or Exceptions above) | The code sample includes text that is 14 pt, non-bold font |
| 8.1-1 | Determine the contrast ratio of foreground text and background. | The contrast ratio for the text is 1.72:1 |
| 8.1-2 | Check that the contrast ratio is at least 4.5:1. [SC 1.4.3] | **FAIL:** The contrast ratio is less than 4.5:1 (it is 1.72) |
| 8.1-3 | f 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:** the code sample does not satisfy the criteria necessary to allow a 3:1 contrast ratio and would fail even if it did with contrast ratio of 1.72:1 |
| Results | If both of the above checks fail, then Baseline Test 8.1-ContrastMinimum fails. | **FAIL:** the code sample fails both checks |
33 changes: 33 additions & 0 deletions testfiles/TF08/08.1-2-fail-2.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!DOCTYPE html>

<html lang="en">
<head>
<title>Color Contrast Tests</title>
<style type="text/css">
/***********General*************************/
body {
height: 100%;
font-size: 14px;
font-family: Ariel, Helvetica, sans-serif;
line-height: 1.4em;
margin:0 auto;
width:90%;
color:#303030;
word-wrap: break-word;
}
h1, h2, h3, h4, h5, h6 {
font-family: Arial, sans-serif;
margin-top:1.3em;
}
</style>
</head>
<body>
<div id="tc_code">
<h2 style="font-size: 1.4em; color: #C0C0FF;">Text for Testing</h2>

</div>


</body>

</html>

0 comments on commit 5ada32c

Please sign in to comment.