Skip to content

Commit

Permalink
update test cases #1304
Browse files Browse the repository at this point in the history
  • Loading branch information
shunguoy committed May 11, 2023
1 parent 028b405 commit db0d038
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export let text_contrast_sufficient: Rule = {
*/
let regex = /[^(a-zA-Z\d\s)\u0000-\u0008\u000B-\u001F\u007F-\u009F\u2000-\u200F\u2028-\u202F\u205F-\u206F\u3000\uFEFF]+/g;
const removed = childStr.trim().replace(regex, '');
if (removed.length === 0)
if (removed.trim().length === 0)
return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,7 @@
UnitTest = {
ruleIds: ["text_contrast_sufficient"],
results: [
{
"ruleId": "text_contrast_sufficient",
"value": [
"INFORMATION",
"FAIL"
],
"path": {
"dom": "/html[1]/body[1]/p[1]",
"aria": "/document[1]/paragraph[1]"
},
"reasonId": "Fail_1",
"message": "Text contrast of 3.66 with its background is less than the WCAG AA minimum requirements for text of size 16px and weight of 400",
"messageArgs": [
"3.66",
16,
400,
"#000000",
"#666666",
false,
false
],
"apiArgs": [],
"category": "Accessibility"
}

]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
<body>

<p style="color: #000; background: #666;">
----=====++++++++___________****a*******%%%%%%%%%%%±±±±@@@@@@@@
----=====++++++++___________****a***** **%%%%%%%%%% #%±±±±@@@@@@@@
</p>
<p style="color: #000; background: #666;">
----=====++++++++___________***********%%%%%%%%%%%±±±±@@@@@@@@
**%%%%%%%%%----=====++++++++___________******* ****%%%%%%% %%%%±±±±@@@@@@@@
</p>

<script type="text/javascript">
Expand Down Expand Up @@ -41,7 +41,7 @@
],
"apiArgs": [],
"category": "Accessibility"
}
}
]
}

Expand Down

0 comments on commit db0d038

Please sign in to comment.