MADISON, Wis. — A judge says state labor officials should have released voters’ names during the Madison teachers union’s recertification election last year.

Gov. Scott Walker’s public union restrictions require unions hold annual elections to remain certified. Madison Teachers Inc. asked the Wisconsin Employment Relations Committee during the union’s 20-day election in November for the names of voters who had cast ballots.

WERC initially refused, saying the names had been given to a vendor handling electronic voting and turning over the names would violate the secret ballot. WERC gave the union the names after the election was over but the union filed a lawsuit demanding damages.

Dane County Judge Peter Anderson ruled Monday that WERC violated the public records law. He said he would determine the amount of damages later.