I started to create a new #HTML5 and #CSS4 boilerplate, mainly for my personal use. I'm aiming for the following:
1. #A11y / #Accessibility support / #ARIA
Often forgotten. This time, it's deeply personal, it's now a must for me.
2. Avoid #IconFonts, use #SVG instead.
Same as the first item, but deserves to be mentioned separately.
3. #Microformats support
For #IndieWeb, #Webmention, #Fediverse, and related support.
4. Use the ‘rel’ attribute where appropriate
Same as those in the previous items.
5. Styling using style classes only. Not microformats classes, as those can be reused for other purposes.
I used to, and I also noticed others doing the same, use microformats classes for styling. And then just override it if the same microformat class is reused elsewhere. Makes everything confusing; and hard to track, especially if you're using someone else's theme/template/skin.
6. Avoid using advance CSS selectors as much as possible; without resorting to multiple styling classes.
Multiple classes, as well as, advance CSS selectors, can and do slow down rendering. It's easy to fall into this trap because it makes things easier. I'm guilty of it.
7. Drop deprecated stuff; and only use future-proof ones.
Like backwards compatibility with anything IE.
Also, many CSS resets are actually no longer needed.
8. Less JavaScript as possible.
If something can be done without scripts, use that method. Everything else is optional. The site should work with or without scripts.
Remember, we're creating a boilerplate that we can reuse. We build on top of it.
9. As semantic as possible.
For example, use “article”, “main”, “nav”, “aside”, “section”, where applicable, instead of “div” with a “role” and/or “id/class”.
We requested for those when HTML5 was being developed, but only few actually use it (especially blog templates).
10. BEM methodology
---
I hope those are everything worth applying in this journey.
Some notes:
* For #SchemaOrg, I prefer #JSON than embedding it in the HTML code through classes or itemprop.
* I understand there are a few with some of the goals I listed already implemented, but I prefer to learn along the way, not “how to use” this and that.