diff options
author | Jesse Hallett <jesse@galois.com> | 2014-01-06 10:50:22 -0800 |
---|---|---|
committer | Jesse Hallett <jesse@galois.com> | 2014-01-06 11:15:49 -0800 |
commit | 55cd32bfaf9ed5bc5418751369e46fa1d7f098e8 (patch) | |
tree | c5759cf75241a4e6bc0fb31596b69c59a9bdc6b5 /guidelines/wikipedia/src/strikeout.js | |
parent | 0a47eab285bf1c04f48a2d6d84838a98807c8c69 (diff) |
Moves rule files to src/
Diffstat (limited to 'guidelines/wikipedia/src/strikeout.js')
-rw-r--r-- | guidelines/wikipedia/src/strikeout.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/guidelines/wikipedia/src/strikeout.js b/guidelines/wikipedia/src/strikeout.js new file mode 100644 index 0000000..e1e3856 --- /dev/null +++ b/guidelines/wikipedia/src/strikeout.js @@ -0,0 +1,14 @@ +exports.name = "Don't use strikeout."; +exports.description = "By default, most screen readers do not indicate presentational text attributes (bold, italic, underline) or even semantic text attributes (emphasis, importance, text deletion), so struck-out text is read normally along with any other text."; + +exports.rule = function (report) { + var err = function(idx, elt) { + report.error("Strikeout tags should not be used.", elt); + }; + + $5('#mw-content-text del').each(err); + $5('#mw-content-text strike').each(err); + $5('#mw-content-text span').filter(function(i, s) { + return (/line-through/).test($(s).css('text-decoration')); + }).each(err); +}; |