Page MenuHomePhabricator

Linter should lint for obsolete HTML attributes
Open, MediumPublic

Description

Right now Linter looks for obsolete tags (<tt>, <center>, and others).

It should look for obsolete or deprecated HTML attributes too (bgcolor, align, and others).

From https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes

  • align on ?? (for some reason MDN doesn't mark this one as obsolete)
  • background on <body>, <table>, <td>, <th>
  • bgcolor on <body>, <col>, <colgroup>, <marquee>, <table>, <tbody>, <tfoot>, <td>, <th>, <tr>
  • border on <img>, <object>, <table>
  • color on <font>, <hr>
  • height on everything except <canvas>, <embed>, <iframe>, <img>, <input>, <object>, <video>
  • width on everything except <canvas>, <embed>, <iframe>, <img>, <input>, <object>, <video>

Then for table (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table) there's also: cellpadding, cellspacing, frame, rules, summary

(Haven't yet cross-referenced which ones the Sanitizer allowed in wikitext)