U.S. homebuilders’ confidence in the housing market edged higher this month, reflecting improved demand for new homes as the traditional spring home-selling season ramps up.

But the outlook for sales of single-family homes over the next six months dimmed slightly as builders continue to grapple with a shortage of skilled workers, ready-to-build land and rising building materials costs.