Properly order HTML attributes for radio inputs