Demand for workers remained robust in late spring, with May job openings and the number of times workers quit their jobs declining but remaining historically high.

The Labor Department on Wednesday said there were a seasonally adjusted 11.3 million job openings in May, a decrease from the upwardly revised 11.7 million the prior month. The number of times workers quit their jobs also fell slightly to 4.3 million from the prior month.

Meanwhile, layoffs rose slightly in May to 1.4 million from 1.3 million the prior month. Layoffs remain below prepandemic trends. Technology companies such as Tesla Inc. and Robinhood Markets Inc. have recently announced layoffs. Hires fell slightly to 6.5 million.

Separate private-sector estimates showed that demand for workers remained robust through mid-June as well, with jobs site ZipRecruiter estimating slightly more than 11.3 million openings. Similarly, Bayard Advertising, a job-advertisement firm, thinks there were 10.9 million openings through mid-June based on job postings and active advertisements.

“We have seen a little bit of softening in certain industries, but the overall job market remains remarkably strong,” said Julia Pollak, chief economist at ZipRecruiter.

Job openings reached a record 11.9 million in March, the highest in records dating back to 2000, after they rose throughout 2021, according to the Labor Department. Meanwhile, the number of times workers quit their jobs also soared in 2021, reaching a record 4.5 million in November.

The U.S. labor market remains strong but has shown some signs of loosening. Other economic readings point to U.S. growth losing momentum under the weight of rising prices and rising interest rates from the Federal Reserve’s campaign to slow growth and cool inflation that is running at its fastest pace in four decades. Consumer spending slowed in May, for instance, along with a decline in home construction.

Employers added 390,000 jobs in May, a robust gain but below the average pace of monthly job growth last year, and the unemployment rate held at a low 3.6%. The Labor Department will release its June employment numbers on Friday; economists surveyed by The Wall Street Journal think employers created 250,000 jobs last month and the unemployment rate held at 3.6%.

Ms. Pollak said the industries that have been pulling back on hiring, such as technology and real estate, have been doing so mostly because of rising interest rates and stock-market turbulence. The Fed last month raised its benchmark interest rate by 0.75 percentage point, the biggest increase since 1994.

Companies such as Netflix Inc. and Tesla Inc., along with Redfin Corp. and Compass Inc., have been shedding workers amid rising costs, but the layoffs in the technology industry remain limited.

“There have been some very high-profile layoffs, but that doesn’t necessarily mean that there are widespread layoffs,” said Daniel Zhao, senior economist at jobs site Glassdoor.

While the overall labor market remains robust, some job seekers are expressing early signs of pessimism about their prospects.

A recent ZipRecruiter survey of job seekers on their ability to land their preferred jobs showed that job seekers still feel confident overall. But their near-term expectations for future labor-market conditions declined significantly in June.

“You’re now starting to see this uncertainty and lack of confidence in other markets seep into the labor market, with job seekers getting a little nervous,” Ms. Pollak said.

Mitch Patel,

president and chief executive of Vision Hospitality Group Inc., a hotel-management company that operates 41 hotels across eight states, said his company still needs workers, mostly for housekeeping jobs.

He said hotel managers sometimes clean the rooms themselves because of a shortage of housekeeping staff. To lure new workers, his company raised wages and added sign-on bonuses. He also plans to pay hourly workers daily.

“We just haven’t seen any evidence of a slowdown for us yet,” Mr. Patel said. “We are concerned with that going forward, but we’re having a record summer right now and we will see what everything looks like in the fall and beyond.”

Mr. Patel said demand has been robust, and he expects that to be the case throughout the summer as Americans show an appetite for summer travel. He said he would monitor bookings data and other metrics before making decisions on hiring or benefits changes.

SHARE YOUR THOUGHTS

What is your business doing to attract and retain workers? Join the conversation below.

Ryan Lang, chief executive of Middle West Spirits, a distillery in Columbus, Ohio, has about a dozen openings at his company, which has 72 employees. The company has openings in operations, finance, human resources, sales and marketing, he said.

Middle West Spirits is getting résumés, and many of the applicants appear to be looking for a change from their current careers.

“They’re requesting way more flexibility than we would normally have as a manufacturing company,” Mr. Lang said.

Write to Bryan Mena at bryan.mena@wsj.com and Rina Torchinsky at rina.torchinsky@wsj.com