Skip to content

Commit

Permalink
Fix nits
Browse files Browse the repository at this point in the history
  • Loading branch information
takenspc committed Jul 28, 2014
1 parent 0090a35 commit c0fb8fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/rules/alt-not-empty.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ HTMLHint.addRule({
}
if ((tagName === 'area' && 'href' in attrMap) ||
(tagName === 'input' && attrMap['type'] === 'image')) {
selector = tagName === 'area' ? 'area[href]' : 'input[type=image]';
if (!('alt' in attrMap) || attrMap['alt'] === '') {
selector = tagName === 'area' ? 'area[href]' : 'input[type=image]';
reporter.warn('Alt of ' + selector + ' must be set value.', event.line, col, self, event.raw);
}
}
});
}
});
});
2 changes: 1 addition & 1 deletion test/rules/alt-not-empty.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,4 @@ describe('Rules: '+ruldId, function(){
var messages = HTMLHint.verify(code, ruleOptions);
expect(messages.length).to.be(0);
});
});
});

0 comments on commit c0fb8fe

Please sign in to comment.