aboutsummaryrefslogtreecommitdiff
path: root/exampleData/ruleSets/basic/emptyHeadings.js
diff options
context:
space:
mode:
Diffstat (limited to 'exampleData/ruleSets/basic/emptyHeadings.js')
-rw-r--r--exampleData/ruleSets/basic/emptyHeadings.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/exampleData/ruleSets/basic/emptyHeadings.js b/exampleData/ruleSets/basic/emptyHeadings.js
new file mode 100644
index 0000000..4d2db46
--- /dev/null
+++ b/exampleData/ruleSets/basic/emptyHeadings.js
@@ -0,0 +1,13 @@
+exports.name = "Don't use empty headings";
+exports.description = 'Empty headings confuse layout';
+exports.rule =
+ function() {
+ var that = this;
+ fiveui.query(':header').each(
+ function(i, elt) {
+ if ($(elt).text() == '') {
+ that.report('Heading is empty', elt);
+ }
+ }
+ );
+ };