CONGRESSIONAL REPUBLICANS’ misguided effort to reshape the U.S. health-care system, which appeared to collapse early Friday, had the virtue of clarifying where the country stands nearly two decades into the 21st century: Americans want universal health-care coverage, including for the poor and the sick, and they expect the government to ensure that it is provided. Republicans and Democrats can argue about how to meet this end — but if they are wise they will no longer dispute the goal.

This ground truth was visible in Friday’s climax on the Senate floor, in which Sen. John McCain (Ariz.) unexpectedly issued a third, decisive Republican vote against moving forward with a GOP bill. Mr. McCain later explained that he objected to the GOP’s partisan effort to ram through changes to the nation’s health-care system, which only became more unseemly at each desperate step. It could also be that he decided to take heat for some of his moderate colleagues, who did not want to significantly cut Americans’ health coverage but who also did not want to draw primary challengers by opposing the repeal of Obamacare. Either way, the GOP approach simply did not reflect what the majority of the country wants.

Even before Friday, Republicans sensed where the nation is. To the extent President Trump said anything specific about health-care policy during his 2016 campaign, he promised to make coverage better and more available. During the repeal-and-replace debate, Republicans decried rising premiums and deductibles, criticized health-care plans that were too stingy for people to use and denied that their proposals would harm people. They made these statements even though their proposals would have raised deductibles, made insurance plans far more stingy and curtailed vulnerable people’s access to coverage. They generally did not sell their policy on its substance, because its foundation was the notion that the government should be less involved in providing health coverage. The fact that they had to pretend their goal was advancing, not degrading, the availability of health care says as much as one needs to know about the national mood.

For much of the past decade, Congress has acted on the principle that beating the other side is more important than practical results, which require compromise. Friday’s vote was a victory for the opposite view, and it opens a thin window of opportunity for fixing, rather than upending, the health-care system. That would start with Republicans rejecting Mr. Trump’s calls to “let Obamacare implode,” by which he means continuing and probably intensifying the GOP’s seven-year effort to sabotage the law.

Republicans would then have to accept the hand some key Democrats have extended in recent days, offering to work in good faith to shore up the existing system. If the goal were to pass Obamacare fixes with 60 Senate votes rather than dismantle the system with 51, many compromises were conceivable. Backstopping insurance markets, reducing uncertainty, relaxing some regulations, making the individual mandate less objectionable to conservatives, adopting automatic health-insurance enrollment — these are just a few of the ideas that could be in a compromise package. The pivot might be difficult for the GOP, but then there’s this: It very likely would be popular.