A Wal-Mart Pickup-Grocery employee waits next to a truck at a test store in Bentonville, Arkansas June 4, 2015. REUTERS/Rick Wilking

Wal-Mart employees were recently told the giant retailer would be easing up on its dress code. A bit.

In addition to khaki or black pants, Wal-Mart employees will now be able to add black- or khaki-colored denim pants to their work wardrobe. While employees still have to wear blue or white collared shirts and Wal-Mart vests, those who work more physically demanding jobs will be able to wear blue jeans and T-shirts. And the company will have "associate engagement days" where workers can wear items such as sport jerseys. (The choices!)

The decision is an example of what retail consultants see as a broader easing up, even if a mild one, by employers on the dress codes of front-line workers. "Retailers and employers are becoming more accommodative," said Burt Flickinger, managing director of the consulting firm Strategic Resource Group. "The trend is definitely evolving toward more casual."

Wal-Mart's dress code change, combined with other moves to adjust the thermostat and change up the music piped in the retail behemoth's stores, is also an example of an increased focus on "soft benefits" for front-line workers, according to retail consultant Neil Stern. As the economy improves and the job market heats up, more employers are looking for ways to keep their employees from jumping ship for other jobs.

"When you start to compete for workers, there’s both hard and soft benefits," said Stern, a senior partner at McMillan Doolittle. "The hard benefits are what I am going to pay you. But people are also paying attention to all the other quality-of-workplace environmental issues that go along with it."

He also says more companies are relaxing policies to cater to millennial-age employees. While the struggle between young people and dress codes may seem like a long-running phenomenon, the size of this generation, as well as their much-researched desire to work for companies that align with their values, has many businesses rethinking their policies.

"I have a great picture in one of my presentations of a Whole Foods worker tattooed and with many earrings," Stern said. "If you don't allow them to have some freedom, they're not going to work for you."

Some are making the mild adjustments to attract young workers. The retailer PetSmart changed its dress code last year to allow "appropriate" visible tattoos (not containing profanity or nudity), as well as a minimum amount of jewelry and piercings. In October, Starbucks also relaxed its tattoo policy, as well as started allowing small nose studs, larger earlobe piercings, black denim, untucked shirts and personalized name badges. "We want to build a company where self-expression, empowerment and inclusion are nurtured," a company executive said a letter to employees.

Others are making the adjustments for different reasons, such as to reflect a new strategy or new corporate management. That was likely the case at Abercrombie & Fitch. In April, following a leadership change, the preppy-chic retailer softened its notoriously intense guidelines, saying workers now simply needed to be "neat, clean, natural and well-groomed." Before, the comprehensive policy had specific restrictions even on hair color ("sunkissed" was okay; "chunks of contrasting" color were not) and fingernails (no long nails or colored polish).

Its old dress code made news both for how restrictive it was and for the legal woes it caused the company. On Monday, even, the Supreme Court ruled in favor of a Muslim woman who said she had been denied a job at the retailer because she wore a head scarf. (Abercrombie said in a statement that the court didn't determine it had discriminated against the woman and that the company was deciding its next steps.)

Still, some company dress codes remain very particular, and some employers have loosened standards only to tighten them again. The Huffington Post recently reported on the dress code for the sandwich chain Jimmy John's — it stipulates no high-top sneakers, no dress shoes that don't have black or brown soles, and no jeans with "excessive stitching" on the rear.

The company's guide includes photos of exactly what shade of khaki pants are acceptable for its sandwich makers and delivery drivers (with big red Xs on those that are either too light or too brown) and says workers may wear only one "cause bracelet," noting it must be "professionally made, for an approved national cause, must be no wider than ½ inch, must be all one color, and must be the 'rubber' style." The company did not have a comment on the policy.

Department store J.C. Penney, meanwhile, has since brought back some degree of formality to its dress code, after former CEO Ron Johnson relaxed it in his wide-ranging efforts to overhaul the company. Liz Dunn, founder of retail consultancy Talmage Advisors, said that under Johnson "it was really difficult to see who even worked there. You can't go too far with it. It's important to let people have some freedom of expression, but at the basic, basic level, people need to be able to identify that you work there."

While the twin goals of identify workers and conveying a brand image will always be engrained in the concept of a corporate dress code, there are some signs that consumers — in addition to employers — are increasingly okay with scaling back its rigor.

The loosening of dress codes "is related, at its core, to changing consumer impressions of what a professional person looks like," Dunn said. "People don't have as many hangups as they used to about tattoos or beards or different religions. There are changing consumer norms, and that's being reflected."

Read also:

Abercrombie & Fitch says it will stop hiring workers based on 'body type or physical attractiveness'

Why Wal-Mart is ditching its Celine Dion soundtrack and getting a DJ

Like On Leadership? Follow us on Facebook and Twitter, and subscribe to our podcast on iTunes.