/* * structure.json * Author: Benjamin Jones * * Guidelines relating to structure (headings, layout, ...) of pages * * Note: the jQuery plugins .nonEmpty() .exists() and .cssIs() haven't * been written yet (1-31-2013). */ { 'name': "Structure Guidelines" , 'description': "Guidelines relating to structure (headings, layout, ...) of pages" , 'rules': [ //-------------------------------------------- { 'name': "Headings exist" , 'description': "every page should include at least one heading" , 'rule': function() { if (! $5(":heading").nonEmpty().exists()) { var elt = $5("body"); report("could not find any (non-empty) headings on the page", elt); } }, //-------------------------------------------- { 'name': "Fluid DIV Layouts" , 'description': "DIVs should not use a fluid layout" , 'rule': function() { $5("body div").cssIs("layout", "fluid").each(function (i, elt) { report("DIV layout should not be fluid", elt); }); }//, //-------------------------------------------- { 'name': "Fluid Body Layouts" , 'description': "Body should not use a fluid layout" , 'rule': function() { $5("body").cssIs("layout", "fluid").each(function (i, elt) { report("BODY layout should not be fluid", elt); }); }//, //-------------------------------------------- ] }