From b1a2e83fa902c124f3a9dc49c5418dfe52781daa Mon Sep 17 00:00:00 2001 From: Marek Lewandowski Date: Tue, 14 Feb 2017 11:41:30 +0100 Subject: [PATCH 1/3] Added tests. --- .../manual/assessments/colorFontContrast.html | 34 +++++++++++++++++++ tests/manual/assessments/colorFontContrast.md | 16 +++++++++ 2 files changed, 50 insertions(+) create mode 100644 tests/manual/assessments/colorFontContrast.html create mode 100644 tests/manual/assessments/colorFontContrast.md diff --git a/tests/manual/assessments/colorFontContrast.html b/tests/manual/assessments/colorFontContrast.html new file mode 100644 index 000000000..cc2519887 --- /dev/null +++ b/tests/manual/assessments/colorFontContrast.html @@ -0,0 +1,34 @@ + + +
+

Font contrast

+

The following text (white text on a white background) should fail: + + foobar + +

+

The following text should also fail: + + foobar + +

+
+ diff --git a/tests/manual/assessments/colorFontContrast.md b/tests/manual/assessments/colorFontContrast.md new file mode 100644 index 000000000..3be5aee2e --- /dev/null +++ b/tests/manual/assessments/colorFontContrast.md @@ -0,0 +1,16 @@ +@bender-tags: tc, 1.1.1, 237 +@bender-include: %TEST_DIR%../../_assets/jquery.min.js +@bender-ui: collapsed +@bender-ckeditor-plugins: a11ychecker,sourcearea,toolbar,undo,wysiwygarea,basicstyles,format,floatingspace,colorbutton,colordialog + +# colorFontContrast + +1. Focus the first editor. +1. Click on the "Check Accessibility" button. + +## Expected + +* Accessibility Checker finds an error about font having an insufficient contrast ratio. +* Accessibility Checker reports **2** above errors. + +Repeat steps for the second editor. \ No newline at end of file From 9b379c2c54ef5caa3aef81c8d86a463c004a2df6 Mon Sep 17 00:00:00 2001 From: Marek Lewandowski Date: Tue, 14 Feb 2017 11:42:34 +0100 Subject: [PATCH 2/3] Added colorbutton plugin to the main example, so that font contrast might be tested as well. --- tests/manual/a11ychecker.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/manual/a11ychecker.md b/tests/manual/a11ychecker.md index ecd9dadcd..e2899da8a 100644 --- a/tests/manual/a11ychecker.md +++ b/tests/manual/a11ychecker.md @@ -1,6 +1,6 @@ @bender-include: %TEST_DIR%../_assets/jquery.min.js @bender-ui: collapsed -@bender-ckeditor-plugins: a11ychecker,sourcearea,toolbar,undo,wysiwygarea,clipboard,basicstyles,list,link,format,image,table,floatingspace +@bender-ckeditor-plugins: a11ychecker,sourcearea,toolbar,undo,wysiwygarea,clipboard,basicstyles,list,link,format,image,table,floatingspace,colorbutton,colordialog Play around with Accessiblity Checker. From 14446edc6fb566efc6706ac27fb8f7c3439005e4 Mon Sep 17 00:00:00 2001 From: Marek Lewandowski Date: Tue, 14 Feb 2017 11:43:44 +0100 Subject: [PATCH 3/3] Fixed #237 - Added a rule to test font color contrast ratio. --- EngineQuailConfig.js | 1 + 1 file changed, 1 insertion(+) diff --git a/EngineQuailConfig.js b/EngineQuailConfig.js index bc025c1d5..ba2c0d806 100644 --- a/EngineQuailConfig.js +++ b/EngineQuailConfig.js @@ -17,6 +17,7 @@ define( function() { 'aMustNotHaveJavascriptHref', 'aSuspiciousLinkText', 'blockquoteNotUsedForIndentation', + 'colorFontContrast', 'documentVisualListsAreMarkedUp', 'headerH1', 'headerH2',