From 7601ea165da8a865954df9dd49ecbf09f3556edd Mon Sep 17 00:00:00 2001 From: Benjamin Jones Date: Thu, 11 Jul 2013 14:32:41 -0700 Subject: updated to WCAG guidelines 1 -- 3; added a rule for checkpoint 3.5 --- guidelines/WCAG-1.0/guideline-2.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'guidelines/WCAG-1.0/guideline-2.js') 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) { -- cgit v1.2.3