McDonald's is yielding to consumer demand and acting ahead of pending federal menu-labeling rules. It will replace all menu boards at its more than 14,000 U.S. locations.

Calorie counts will be posted alongside images of juicy burgers on McDonald's menu boards nationwide starting next week, much as they have been in California for more than a year.

Yielding to growing customer demand and acting ahead of pending federal rules, the fast-food giant said it would replace all inside and drive-through menus at its more than 14,000 U.S. locations with new signs with nutritional details.

Analysts said they expect other major chains to follow suit soon.

"The restaurant industry has been in the cross hairs of Congress for a decade now, starting with trans fat, then with the kids' meals, then salt, now calories," said Steve West, an analyst with ITG Investment Research. "There's this evolution of mandates that restaurants get their act together. But it's not something that happens overnight."

Menu labeling, which informs patrons that a Big Mac, say, has 550 calories, is already mandated in some cities and states. California began requiring restaurants with 20 or more locations to put calorie counts on menus last year.

But enforcement has been lax as the industry waits for the implementation of the national menu-labeling provision that is part of President Obama's sweeping healthcare reform law of 2010.

The U.S. Food and Drug Administration is working on proposed rules, for example, on calorie counts for pizza makers and other eateries that allow customers to customize their dishes.

As other components of the healthcare law draw heated debate, the expected debut of the menu-labeling rules has been pushed from last year to later this year or early 2013.

Still, several health advocates slammed McDonald's Corp., accusing it of disingenuously spinning an inevitable requirement as if it were a voluntary decision.

"McDonald's is setting the tone that it's a leader when the reality is that there's an incredible amount of pressure being generated from a broad coalition of parents, health professionals and more that's really forced the company to take action," said Sara Deon of the advocacy group Corporate Accountability International.

She said the chain is sidestepping its true problem: the "aggressive marketing of junk to children." But she conceded that McDonald's move Wednesday was a "small step in the right direction."

Chains such as Panera Bread Co. and Au Bon Pain have been posting calorie counts in their stores. The Subway sandwich chain has long touted its focus on nutrition.

Still, though, McDonald's is beating many other rivals, "to its credit," said Margo G. Wootan, nutrition policy director for the Center for Science in the Public Interest.

"We've made a lot of good progress toward our nutrition commitments, and we recognize there's still more to do," said Dr. Cindy Goody, McDonald's senior director of nutrition.

McDonald's wouldn't disclose how much its new menu-labeling effort would cost, saying only that "we see this as an investment in our business and our customers."

Whatever McDonald's motivations, analysts said its menu-labeling initiative and other recent efforts are gradually influencing the entire fast-food industry to be more transparent about the ingredients in their meals.

The industry, squeezed since the recession, is fighting hard to keep a customer base increasingly interested in wholesome foods and attracted to fast-casual brands such as Chipotle and Five Guys Burgers & Fries.

In addition, health advocates and legislators have accused fast-food companies of selling high-calorie food that has increased obesity, which affects more than a third of adults and 17% of children, and has led to other dangerous conditions.

McDonald's thrived through the recession largely by diversifying its menu with beverages, wraps and salads — offerings recently adopted by competitors such as Burger King.

On Wednesday, McDonald's said it was testing other so-called better-for-you options. Possibilities include seasonal produce such as blueberries and cucumbers, grilled chicken, McWraps starting at 350 calories and a version of the Egg McMuffin made with egg whites and whole grain muffins.

With Americans eating out more often than before, the better-for-you trial items are "terrific," Wootan said.

Earlier this summer, McDonald's launched its "Favorites Under 400" promotion. The chain said 80% of its U.S. menu fell under the calorie limit. It also pledged to cut sodium content 15% in its nationwide food menu by 2015.

Last year, McDonald's bowed to pressure from health advocacy groups on its Happy Meals for children by adding apple slices and a fat-free or low-fat milk option and shrinking the portion of fries.

Lately, the world's biggest burger chain has featured farmers and ranchers in its commercials — all of them its suppliers — to show its attempts to use more locally and sustainably sourced foods.

This week, McDonald's said its same-store sales for August improved from July, when the company recorded its lowest comparable-store sales in nine years.

On Wednesday, shares of the Oak Brook, Ill., company slipped 38 cents, or 0.4%, to $90.82.