brail icon indicating copy to clipboard operation
brail copied to clipboard

Linting: Add more HTML linting

Open sinclairnick opened this issue 3 years ago • 0 comments

Currently, the ESLint plugin is largely automatic, based on the caniemail.com data.

However, there are more nuanced HTML rules that should be added, such as:

  • [ ] Prefer using <div role=“”> over unsupported semantic tags like <header>
  • [ ] Prefer html attr for width, height, align, valign, border, color or bgcolor (overloading ok)
  • [ ] ...prefer styles for rest
  • [ ] When using percentage widths, we should also set an html attr of width as fixed for OL support
  • [ ] Border="0" cellspacing="0" cellpadding="0" should be set on tables for consistency
  • [ ] Use margin and padding for spacing, multiple BRs and empty TDs should be avoided
  • [ ] Prefer Hex color (with 6 characters?)
  • [ ] Image should have alt tag
  • [ ] Image should have src
  • [ ] (Warn only) Consider setting a background color when setting a background image

More items will be added to this list over time.

sinclairnick avatar Mar 13 '23 22:03 sinclairnick