From 79cb236d02c5ccdc7f4ce94a235c568dd3459528 Mon Sep 17 00:00:00 2001 From: Benjamin Jones Date: Thu, 13 Jun 2013 16:37:03 -0700 Subject: more cleanup --- exampleData/ruleSets/alwaysErrThreeTimes.json | 27 ------------- exampleData/ruleSets/basicUIRules.json | 58 --------------------------- 2 files changed, 85 deletions(-) delete mode 100644 exampleData/ruleSets/alwaysErrThreeTimes.json delete mode 100644 exampleData/ruleSets/basicUIRules.json (limited to 'exampleData') diff --git a/exampleData/ruleSets/alwaysErrThreeTimes.json b/exampleData/ruleSets/alwaysErrThreeTimes.json deleted file mode 100644 index 9c2b358..0000000 --- a/exampleData/ruleSets/alwaysErrThreeTimes.json +++ /dev/null @@ -1,27 +0,0 @@ -{ 'name': 'always errors' -, 'description': 'A trivial rule set for experimentation.' -, 'rules': [ -//--------------------------- - { 'id': 112201 - , 'name': 'Reports three times' - , 'description': 'Test guideline that reports three errors' - , 'rule': - function() { - report('Problem 1 (g1)', null); - report('Problem 3 (g1)', null); - report('Problem 2 (g1)', null); - } - }, -//--------------------------- - { 'id': 1122202 - , 'name': 'Reports two times' - , 'description': 'Test guideline that reports two errors.' - , 'rule': - function() { - report('Problem 1 (g2)', null); - report('Problem 2 (g2)', null); - } - }//, -//--------------------------- - ] -} diff --git a/exampleData/ruleSets/basicUIRules.json b/exampleData/ruleSets/basicUIRules.json deleted file mode 100644 index eeccb9b..0000000 --- a/exampleData/ruleSets/basicUIRules.json +++ /dev/null @@ -1,58 +0,0 @@ -{ 'name': 'Basic HTML guidelines.' -, 'description': 'A selection of simple HTML guidelines for improved usability and consistency.' -, 'rules': [ - //--- - { 'id': 1001801 - , 'name': 'All input fields have exactly one label.' - , 'description': '

Screen readers rely on HTML attributes to identify the purpose ' - + "of form widgets on-screen. These tools use label tags with 'for' " - + 'attributes that specify the id of the form element they pertain to. ' - + 'Some of the components of this web page do not have those labels.

' - , 'rule': - function() { - fiveui.query(':input').each( - function(i, elt) { - if (elt.id) { - var $label = fiveui.query("label[for='" + elt.id + "']"); - - if (1 < $label.size()) { - report('Form element has too many labels', elt); - } - - if (0 == $label.size()) { - report('Form element has no label', elt); - } - } - }); - } - }, - //--- - { 'id': 1001802 - , 'name': "Don't use empty headings." - , 'description': 'Empty headings confuse layout.' - , 'rule': - function() { - fiveui.query(':header').each( - function(i, elt) { - if ($(elt).text() == '') { - report('Heading is empty', elt); - } - }); - } - }, - //--- - { 'id': 1001803 - , 'name': "Don't use empty hrefs." - , 'description': "Links with no text can't generally be used." - , 'rule': - function() { - fiveui.query('a').each( - function(i, elt) { - if ($(elt).text() == '' && elt.title == '') { - report('Link has no text', elt); - } - }); - } - }//, - ] -} -- cgit v1.2.3