NEW YORK — Massachusetts Sen. Elizabeth Warren condemned housing laws that “targeted communities of color.” New Jersey Sen. Cory Booker focused on the injustice of climate change. California Sen. Kamala D. Harris railed against the Education Department as hostile to affirmative action.

Potential 2020 presidential candidates addressed the Rev. Al Sharpton’s National Action Network convention this week, tailoring their pitch to black voters who complain that Democrats have taken their support for granted and pressed for more from the party.

Democrats with state and national ambitions have responded, endorsing automatic voter registration, criminal justice reform and the decriminalization of marijuana.

“They’re going to have to articulate an agenda,” said Marc La­mont Hill, a professor at Temple University who supported the Green Party in 2016. “They can’t just come to us as a captured electorate — they can’t say, ‘Hey, you’re going to vote for us anyway.’ We can leverage our power and ask them to make responsible, responsive policy.”

Black support wasn’t an issue in 2008 and 2012, with Barack Obama seeking the presidency. But in 2016, with Hillary Clinton as the nominee, the black turnout rate fell to 60 percent, the first decline in 20 years.

Donald Trump, who had questioned whether Obama was born in the United States, did better with black voters than either of the Republican nominees who had challenged Obama.

To Sharpton, it seemed that Democrats, with plenty to offer black voters, had opted for a bland anti-Trump campaign.

“They had not engaged in a lot of these issues,” Sharpton said in an interview. “For a lot of them, 2016 was a wake-up call. If Hillary got more black votes in Detroit, Milwaukee and Philadelphia, she’d be president. They’re finally getting that they were behind the learning curve.”

Democrats have been working fast to change that. On Wednesday, New York Gov. Andrew M. Cuomo (D), another potential candidate for president, used the conference to announce that he would restore voting rights to felons on parole, potentially affecting 35,000 people. On Friday, in Washington, Senate Minority Leader Charles E. Schumer (D-N.Y.) introduced legislation that would decriminalize marijuana, saying that it would allow “minority-owned business to have a fair shot in the marijuana industry.”

Trump has remained unpopular with black voters; in the latest Washington Post/ABC News poll, just 11 percent said that they approved of the job he was doing. But several of the Democrats seen as potential presidential candidates don’t have an obvious claim on the black electorate.

Warren related her own story of growing up poor in Oklahoma in a “paycheck-to-paycheck family” to what African Americans had experienced during the 2008 financial crisis.

“I can’t tell you how many women told me that they had to sell their wedding rings,” said Warren. When she began to quote a verse about poverty from the Gospel of Matthew, the crowd recited it by memory.

“You can always tell a Sunday school teacher,” said Warren. “Old school. I still do King James.”

Sen. Bernie Sanders (I-Vt.), who struggled to win over black voters in his race against Clinton for the Democratic nomination in 2016, spoke to the conference about participating in the 1963 March on Washington. He said former Ohio state senator Nina Turner, a black woman, had taken over his political group Our Revolution and helped it elect a Philadelphia district attorney who was ending mass incarceration.

“We can’t talk about a strong economy when 34 percent of African American children today are living in poverty,” said Sanders. “We can’t talk about a strong economy when black high school graduates have an unemployment rate of over 40 percent — and then we wonder why bad things happen?”

Sen. Kirsten Gillibrand (D-N.Y.) promoted her support for a ­government-funded full employment plan, saying that Coretta Scott King had fought for it and it was time for Democrats to embrace it.

“Coretta refused to accept the concept that full employment, a job for everyone, was impossible,” said Gillibrand. “I agree with Coretta.”

Former attorney general Eric Holder also spoke to the conference.

“None of them have announced. They’re on what we call a temperature tour,” said Sharpton.

But in the crowded conference rooms, it was hard to miss the enthusiasm for Harris and Booker — two of the three African Americans in the Senate.

Sharpton, who congratulated Warren for being attacked as “Pocahontas” by Trump — “we call her Sister Po-Po,” he said — introduced Harris as “Honest Kamala” and compared her to Abraham Lincoln. After quoting Trump’s “what do you have to lose” line, she rattled off the things that “we” had to lose, from fair housing laws to health care.

Booker took a similar tone, sometimes chiding the Democrats who had come around on black issues by asking what had taken them so long.

“I know all these people want to talk about legalizing marijuana,” Booker said. “Well, marijuana has been decriminalized for the privileged for a long time. There’s nobody stopping and frisking on college campuses!”

Sharpton, who has tangled with Trump for decades, said that he had asked the Trump administration if it wanted to send representatives to the convention in 2017 and 2018.

“Last year they sent us Omarosa,” said Sharpton, referring to White House aide Omarosa Manigault-Newman, who has since been dismissed. “I guess they don’t have another Omarosa.”