Using data- which is the niche made for this in the standard, seems to be the solution that's more likely to still work 15 years down the line.
Our workflows should have us practice writing _valid_ code, which our tools can then take and transform into other _valid_ code. Any workflow where the humans practice doing the _invalid_ thing so the tool can magically fix it later is a bad idea IMO. Practice writing good code and use tools to make it even better!