This question is part of the general matter of the First Amendment rights of elected judges who are required to be political and yet expected to be in certain ways apolitical; In re Young (N.Y. Comm’n on Judicial Conduct Oct. 7, 2011) has a long discussion in a concurrence that says New York’s elected trial courts judges do have a First Amendment right to engage in such political activity, and a brief statement in the majority opinion condemning such behavior.