These companies are in the vanguard of a movement, some experts believe. “We’re in the midst of revolutionary changes in the workplace,” said Stew Friedman, director of the Wharton Work/Life Integration Project at the University of Pennsylvania. “It will be a 15- to 20-year project, but the competitive pressures in the labor market are pushing toward greater freedom and flexibility.”

At the same time, the new benefits are an acknowledgment that the American economy is struggling to adjust to modern gender roles and the rise of two-income families. As work hours have increased, and in the absence of government policies like paid parental leave, the work-family juggle has become daunting for many workers at all income levels. More than half of nonworking Americans say family responsibilities are a reason they are not working, according to a New York Times/CBS News/Kaiser Family Foundation poll.

Just 12 percent of workers in the United States private sector have access to paid family leave, according to the Department of Labor. White-collar workers are often expected to have a singular focus on work: Amazon, which a recent New York Times article showed fosters a bruising atmosphere, offers no paternity leave. For blue-collar workers in most companies, leave is even less common. Netflix, for instance, did not give its leave to hourly workers.

One reason some companies are doing this now is that millennials, the biggest generation in the work force, have higher expectations for gender equality at home and for accommodations from their employers. Highly educated women have become more likely to believe that an ambitious career does not preclude children. And the competition for elite workers has become so fierce that companies are searching for new ways to recruit and retain them.

“The U.S. may be behind on family-friendly benefits, but I see it’s changing, because we’re all facing a talent war,” said Julie Sweet, Accenture’s chief executive of North America.

This summer, Goldman Sachs doubled its paid paternity leave to four weeks. IBM and Accenture said they would ship breast milk home for nursing mothers traveling for work. On Tuesday, Twitter told Fortune it would offer the same milk-shipping service. Nestlé expanded its paid maternity leave to 14 weeks from six. Vodafone expanded its maternity leave and said new mothers could work 30 hours a week at full pay for their first six months back. And at KKR, the investment firm, if new parents are traveling on company business, the firm will pay for a nanny’s plane ticket, meals and hotel room.