Hens, cows and pigs owe Californians a thank you for approving a law Tuesday guaranteeing minimum living space on farms -- though Alaskans had some bad news for wild salmon and trout.

States across the US consult the public on all manner of issues at election time -- from drug decriminalization to gun control and the death penalty -- and west coast voters had some weighty proposals on the ballot for the midterm congressional elections.

In California, the nation's most populous state, Proposition 12 called for the provision of adequate space for egg-laying hens, as well as calves and pigs destined for slaughter.

There was opposition from agriculture professionals who said the measures would push up prices, and could even lead to shortages or the spread of disease.

But more than 60 percent of voters were in favor and the proposition -- also known as the Farm Animal Confinement Initiative -- is due to take effect from 2020.

"Change is coming," Josh Balk, vice president at the Humane Society of the United States, which sponsored and financed the measure, told The Orange County Register.