Silicon Valley has long portrayed the U.S. visa program for skilled foreign workers as a win-win, providing much-needed tech talent and fueling innovation and economic growth.

Critics—including President Donald Trump—have said that the H-1B visa program disadvantages American workers by allowing companies to hire cheaper foreign labor for roles that would have gone to U.S. workers.

...