Eggs are an excellent food — nutritious, tasty, versatile, rich in protein, and largely acquitted of any role in raising blood cholesterol. The average American eats 250 eggs a year in everything from omelets to cakes.

But there is a downside to eggs: the treatment of hens that lay them. Modern egg production facilities typically confine chickens in cramped wire cages too small to allow them to even spread their wings. The average hen has only about 67 square inches of space, which is smaller than a sheet of paper.

Animal welfare advocates have long pushed for more humane standards, and the idea is catching on in a big way. Last week, Sen. Dianne Feinstein, D-Calif., introduced a bill to require egg producers to make significant improvements in the treatment of hens. The legislation has the endorsement of the United Egg Producers, which represents close to 90 percent of the industry, as well as the Humane Society of the United States.

The bill would mandate that each hen get at least 124 square inches of room, nearly double the current norm. It requires "enriched" cages that allow chickens to perch, nest and scratch. And it calls for labels to let consumers know if the eggs they buy come from hens that are caged, cage-free, or free-range. Producers would have at least 15 years to make the changes, minimizing the costs they would bear.

It's a small but important step, and it deserves to be enacted. Americans are already demanding better conditions for the animals that provide our food, even if it may mean slightly higher prices. Two states have outlawed cramped cages.

Major chains like Costco and Wal-Mart already insist on cage-free eggs for their private brands. Food companies General Mills and Kraft are shifting in that direction. Burger King has announced that within five years it will switch to all cage-free eggs.

All these choices reflect changing consumer preferences. Even in a tough economy, many Americans put a premium on decent treatment of farm animals.

The virtue of federal legislation is that it sets a minimum standard of care for animals while sparing responsible producers from the threat of being undercut on price by less scrupulous competitors.

"This is legislation that egg farmers want and need to survive," said David Lathem, of the United Egg Producers. It's a good thing for consumers too — not to mention chickens.