MADISON, Wis. - Wisconsin voters could legally take selfies with their marked election ballots under a bill the state Senate approved Tuesday.

Wisconsin is one of 18 states with a law barring the showing of a completed ballot, but it is rarely enforced. The Senate approved the bill on a voice vote. It goes next to the state Assembly.

The measure’s supporters call the ban archaic, especially in an era in which voters are increasingly posting pictures of themselves with their marked ballots on social media platforms such as Instagram and Facebook. But county election clerks warned last year that changing the law could open the door to undoing the secrecy of the ballot.

The Wisconsin County Clerk Association registered against the bill. Clerks warned lawmakers that making it commonplace to show a marked ballot could lead to employers, unions or others forcing people to prove they voted a certain way to receive a benefit or avoid being punished. They also voiced concern about how people legally taking photos in a polling location could infringe on the confidentiality rights of other voters.

Court rulings on ballot selfies have been mixed across the country after several cases sprung up from the 2016 presidential elections. Courts in New Hampshire and Indiana found that laws in those states prohibiting ballot selfies were unconstitutional. The U.S. Supreme Court declined to take up the case out of New Hampshire after that state’s law was found to be unconstitutional.

However, in Michigan and New York, state laws banning ballot selfies at polling places were upheld.