diff options
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); +}; |