Virginia voters won't be allowed to wear clothing featuring John McCain or Barack Obama when they head to the polls on Nov. 4.

The State Board of Elections on Tuesday voted to ban clothing and hats as well as buttons and other paraphernalia that directly advocate the election or defeat of a specific candidate or issue.

The American Civil Liberties Union argued that the ban violates the First Amendment's right to free speech. The board, however, said it has to weigh that against the right to vote free of undue influence or the tension that candidate advocacy might create.

Efforts to enforce a similar ban are headed to court in Pennsylvania. At least four states — Maine, Montana, Vermont and Kansas — prohibit wearing campaign buttons, stickers and badges inside polling places.

In September, a Pennsylvania Department of State memo — it is not legally binding — advised counties that voters' attire doesn't matter as long as the "voter takes no additional action to attempt to influence other voters." Two Pittsburgh-area elections officials sued to have the memo rescinded.

The two argued that if the memo stands, "nothing would prevent a partisan group from synchronizing a battalion of like-minded individuals ... to descend on a polling place, presenting a domineering, united front, certain to dissuade the average citizen who may privately hold different beliefs."

Poll workers in Kentucky were told last month by election officials that they should admit voters with campaign apparel. E-mails had circulated warning that Obama supporters would be turned away if they wore shirts and pins.