diff options
Diffstat (limited to 'exampleData/ruleSets/accessibility/headingExists.js')
-rw-r--r-- | exampleData/ruleSets/accessibility/headingExists.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/exampleData/ruleSets/accessibility/headingExists.js b/exampleData/ruleSets/accessibility/headingExists.js new file mode 100644 index 0000000..afd359e --- /dev/null +++ b/exampleData/ruleSets/accessibility/headingExists.js @@ -0,0 +1,10 @@ +exports.name = "headingExists"; + +exports.description = "Page contains at least one heading"; + +exports.rule = function() { + var headings = fiveui.query(':header'); + if (0 == headings.length) { + this.report('No headings found on page'); + } +}; |