A Republican-controlled county in Pennsylvania violated state law when election workers refused to tell voters that their mail-in ballot had been rejected and wouldn't be counted in last April's primary election, a judge ruled.