Asked if they supported restrictions after 24 weeks — roughly when a healthy fetus can survive outside the womb, though viability varies from pregnancy to pregnancy — only Mr. Sestak said yes. (Ms. Gabbard, who did not complete the survey, has also said she supports restrictions in the third trimester.) Several candidates emphasized that less than 1 percent of abortions happen that late, often because of life-threatening conditions or severe fetal abnormalities.

Amy Klobuchar’s campaign did not fully answer the question, saying she believed “any restrictions must be consistent with Roe v. Wade.”

Sign up for On Politics to get the latest election and politics news and insights. Sign up for our politics newsletter

Roe allowed near-total bans in the third trimester as long as there was an exception for life- or health-threatening situations. Planned Parenthood v. Casey replaced the trimester framework with one based on viability, which can start in the late second trimester.

An emboldened defense

For years, the battle over the Supreme Court has been conducted in code. Republicans denounced “judicial activism” and Democrats called for justices who would “respect precedent” — that they were talking about one precedent in particular remaining unsaid.

Not anymore.

In May, Kirsten Gillibrand vowed to nominate only judges who would uphold Roe v. Wade. Though she is no longer in the race, her pledge is: All of the candidates who completed the survey said they would “require judicial nominees to support Roe v. Wade as settled law.”

Mr. Biden’s campaign brought up his role in blocking Robert Bork’s confirmation to the Supreme Court in 1987, which probably would have meant the end of Roe. Mr. Biden’s objections then were more about birth control than abortion — but his eagerness now to play up the latter is telling of how profoundly the Democratic terrain has shifted.