You can invent your own functions or extend core for sure, but in this case it's simpler and much faster to modify a single core file, instead of every other theme or plugin. It's your choice, really. But, as I mentioned earlier, the goal is not very important. W3C and HTML5 is a "work in progress", which means unless you continuously check for compliance, at one point you might become incompatible again. Better invest your time & energy into more important issues, than simple html scheme rules IMHO.
Regards