I don't really understand what that article is trying to achieve...
Of course you should be using valid HTML for your projects, and logically it should be the way to achieve maximum compatibility ?
If a platform tells you to insert some HTML code in the wrong place, either follow their instructions and ask them to verify it's okay, or if you know what you're doing just fix it when pasting it on your website.
As for javascript libraries that are violating rules, none are listed in the article... And if they are, just report it to their tracker or submit a PR ?
Were you thinking of a way Flarum is breaking HTML rules ?