It's still a little unclear whether browsers are willing to converge on attribute order so maybe we should use lexicographical order here? That doesn't seem ideal though so maybe we should just hope browsers will converge on some kind of attribute order...
Copying @bzbarsky and @hsivonen since they might have opinions here.