aboutsummaryrefslogtreecommitdiff
path: root/exampleData/ruleSets/accessibility/imagesAltText.js
blob: 8941caf0d649f825550f07e339ce957ebe768207 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
exports.name = "imagesAltText";

exports.description = "Each image should have an alternative text description";

exports.rule = function() {
  var that = this;
  fiveui.query('img')
     .filter(function (i) {
               return $(this).attr('alt') == '';
             })
     .each(function (i, e) {
             that.report('Image has no alt text', e);
           });
};