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

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

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