As President Trump battled the coronavirus on Monday, Joseph R. Biden Jr. ventured onto the campaign trail, where he wished the president a speedy recovery but criticized his leadership, suggesting that he bore some responsibility for his positive test after flouting public health guidelines around masks and social distancing.

During campaign stops in Miami and later at a town hall event hosted by NBC News, Mr. Biden sought to draw contrasts with his rival on some of the most searing matters of the day for South Florida voters, denouncing Mr. Trump’s stewardship of the pandemic and lashed him for embracing autocrats.

“Anybody who contracts the virus by essentially saying masks don’t matter, social distancing doesn’t matter, I think is responsible for what happens to them,” Mr. Biden said at the town hall, asked whether Mr. Trump shouldered some responsibility for contracting the virus.

“Quite frankly, I wasn’t surprised,” he said in response to another question.

Mr. Biden, whose campaign said he had tested negative for the coronavirus on Sunday, traveled to Miami to speak to Haitian-Americans, Cuban-Americans and others from immigrant backgrounds, working to strengthen his standing with a range of constituencies in a state widely regarded as a must-win for Mr. Trump.

Mr. Biden has moved to take down negative advertising — though how long that approach will last is unclear — and he has limited his criticism of Mr. Trump in recent days. But on Monday, after the president unleashed a flurry of all-caps tweets urging his supporters to vote, Mr. Biden issued several sharp remarks about the administration’s approach to the virus, even as he expressed well wishes for the president’s health.

“I was glad to see the president speaking and recording videos over the weekend,” Mr. Biden said during an address that he delivered in the Little Havana neighborhood of Miami while wearing a mask. “Now that he’s busy tweeting campaign messages, I would ask him to do this: Listen to the scientists. Support masks. Support a — mask mandates nationwide.”

The Democratic nominee’s trip came nearly a week after he and Mr. Trump shared a debate stage in Cleveland, and at the town hall Mr. Biden acknowledged that it was “a little disconcerting to look out and see that his whole section, no one had masks on.”

Early Friday, Mr. Trump said he had tested positive for the virus. Later in the day he was hospitalized at Walter Reed National Military Medical Center. On Monday evening, Mr. Trump left the hospital after tweeting in reference to a disease that has killed more than 209,000 people in the United States: “Don’t be afraid of Covid. Don’t let it dominate your life.” He emphasized that message in a video he posted on Twitter soon after arriving back at the White House.

“There’s a lot to be concerned about,” Mr. Biden responded on NBC, noting the death count. “I hope no one walks away with the message, thinking that it is not a problem. It’s a serious problem.”

Image“Wouldn’t it be an irony, the irony of all ironies, if on election eve it turned out Haitians delivered the coup de grâce in this election?” Mr. Biden said at the Little Haiti Cultural Center in Miami.
Credit…Hilary Swift for The New York Times

In his earlier remarks in Little Havana, Mr. Biden also appealed to other concerns of vital interest to many Floridians, such as climate change, immigration and American leadership on the world stage, including the United States’ posture toward “the massive humanitarian crisis in Venezuela.”

“Maduro, who I’ve met, is a dictator, plain and simple,” he said of the Venezuelan strongman Nicolás Maduro, a nod to the many Venezuelans who fled that country and settled in South Florida. (Mr. Trump’s administration has opposed Mr. Maduro and has sought to oust him from power, but the president told Axios in June that he would consider meeting with the Venezuelan leader.)

“President Trump cannot advance democracy and human rights,” Mr. Biden said, “when he has embraced so many autocrats around the world, starting with Vladimir Putin.”

Republicans, nationally and especially in Florida, are seeking to cast the relatively moderate Mr. Biden as a socialist. Democrats have responded to the effort with incredulity, but it has appeared to gain some traction with some South Florida voters. Cuban-Americans in South Florida have typically leaned more conservative, and there have been signs that Mr. Trump improved his standing with Cuban-American voters after encountering some opposition in 2016.

Mr. Biden was asked about claims of socialism by an attendee at the town hall. He noted that he had defeated Senator Bernie Sanders, a democratic socialist, in the primary (Mr. Sanders campaigned for Mr. Biden on Monday in Michigan).

“I look like a socialist?” Mr. Biden said. “I’m the guy that ran against the socialist, remember? I got in trouble through the whole campaign, twenty-some candidates — ‘Joe Biden was too centrist, too moderate, too straightforward.’ That was Joe Biden.”

He said had taken on “dictators” and said “there’s not one single syllable that I’ve ever said that could lead you to believe that I was a socialist or a communist.”

Earlier, in Little Havana, Mr. Biden described a record of standing “against dictators of the left and the right.”

He also called for a Cuba policy that emphasizes “empowering the Cuban people to determine their own future.” The United States restored diplomatic relations with Cuba under the Obama administration, but Mr. Biden was critical of the Trump administration’s approach since then.

“Cuba is no closer to freedom and democracy than it was four years ago,” he said, arguing that the current “administration’s approach is not working.”

His first stop in Florida, where residents are already voting, was at the Little Haiti Cultural Center. Haitian-Americans have generally leaned Democratic, and the president has crudely disparaged Haiti.

“Wouldn’t it be an irony, the irony of all ironies, if on election eve it turned out Haitians delivered the coup de grâce in this election?” Mr. Biden said there.

Yet some Haitian-Americans were critical of Hillary Clinton in 2016, and a number of leaders and activists in the community in South Florida have said this year that Mr. Biden and the Democratic Party have not conducted sufficient engagement, according to local reports.

“This is the last day you can register to vote in Florida,” Mr. Biden said, promising to return. “The Haitian community itself can determine the outcome of this election.”

Fernand R. Amandi, a longtime Democratic pollster and strategist in Florida, said Mr. Biden’s itinerary showed “that the vice president and his campaign are well aware that Florida is won by managing the margins and maximizing every single last potential voter in a state that will likely be decided by a few thousand votes or a single percentage point.”

A New York Times/Siena College poll conducted last week found Mr. Biden leading Mr. Trump by five percentage points in Florida.

Thomas Kaplan and Patricia Mazzei contributed reporting.