aboutsummaryrefslogtreecommitdiff
path: root/guidelines/WCAG-1.0/guideline-2.js
diff options
context:
space:
mode:
authorGravatar Benjamin Jones <bjones@galois.com>2013-07-11 14:32:41 -0700
committerGravatar Benjamin Jones <bjones@galois.com>2013-07-11 14:32:41 -0700
commit7601ea165da8a865954df9dd49ecbf09f3556edd (patch)
treef4e83bb57fc7b977bb6acfb75e6f25478089b056 /guidelines/WCAG-1.0/guideline-2.js
parent867f5c62c9e21790d305e7f43727c90e1d5628c2 (diff)
updated to WCAG guidelines 1 -- 3; added a rule for checkpoint 3.5
Diffstat (limited to 'guidelines/WCAG-1.0/guideline-2.js')
-rw-r--r--guidelines/WCAG-1.0/guideline-2.js11
1 files changed, 2 insertions, 9 deletions
diff --git a/guidelines/WCAG-1.0/guideline-2.js b/guidelines/WCAG-1.0/guideline-2.js
index 7dcf28d..206dd3e 100644
--- a/guidelines/WCAG-1.0/guideline-2.js
+++ b/guidelines/WCAG-1.0/guideline-2.js
@@ -1,13 +1,7 @@
-exports.name = "colorDifference";
-exports.description = "Elements should provide sufficient color difference";
+exports.name = "Color Difference";
+exports.description = "Web Accessibility Guideline: Don't rely on color alone";
exports.rule = function(report) {
- /* Checkpoint 2.1 ***********************************************************/
-
- // TODO: not sure about the best way to test that information isn't hidden
- // when colors go away.
-
-
/* Checkpoint 2.2 ***********************************************************/
var fc = fiveui.color;
@@ -30,7 +24,6 @@ exports.rule = function(report) {
return $this.children().length == 0 && $.trim($this.text()).length > 0;
})
.each(function (i) {
- // TODO take into account fg alpha values
var fg = fc.colorToRGB($(this).css('color'));
var bg = fc.findBGColor($(this));
if (fg && bg) {