Democratic presidential contender Kamala Harris slammed the chattering class for advocating that only a white male candidate could beat President Donald Trump in next year's election.

Harris, in a speech to the NAACP in Detroit, noted with distain in her voice that pundits who talk about 'electability' argue 'certain voters' would only vote for 'certain candidates' - talk that was was seen as a veiled reference at former Vice President Joe Biden and Sen. Bernie Sanders - the two frontrunners for the Democratic nomination.

'There has been a lot of conversation by pundits about the electability and who can speak to the Midwest? But when they say that, they usually put the Midwest in a simplistic box and a narrow narrative, and too often their definition of the Midwest leaves people out,' the African American senator from California said on Sunday evening.

Kamala Harris slammed the chattering class for advocating that only a white male candidate could beat President Trump

Her speech contained what was seen as veiled references to Joe Biden (left) and Bernie Sanders (right)

She argued that leaves out voters of color and women.

'It leaves out people in this room who helped build cities like Detroit. It leaves out working women who are on their feet all day - many of them working without equal pay,' she added.

Then she went in for the kill.

'And the conversation too often suggests certain voters will only vote for certain candidates regardless of whether their ideas will lift up all our families. And it's short sighted. It's wrong. And the voters deserve better,' Harris said.

'As a party we cannot let ourselves be drawn into thinking in those boxes or falling into those assumptions. We cannot get dragged into simplistic narratives that are yesterday's politics,' she added.

Harris' argument comes amid a growing wave of sentiment by some pundits that only a white male like Biden or Sanders could beat Trump in the industrial Midwest states of Michigan, Pennsylvania, Ohio and Wisconsin - states that handed him a victory over Hillary Clinton in 2016.

Biden, who is leading in the polls, has used the electability argument when touting his candidacy for the 2020 Democratic presidential nomination.

'So many people have come to us and said Joe's got to run, Joe's got to run. And so we just decided maybe this was his time,' his wife Jill Biden said Tuesday on CBS 'This Morning.'

Harris' argument comes amid a growing wave of sentiment by some pundits that only a white male like Biden or Sanders could beat President Trump in the industrial Midwest in 2020

'This is do-or-die, and Joe Biden is the best candidate to go against Trump in November,' Dick Harpootlian, a South Carolin state senator who hosted a Biden fund-raiser in Columbia, told Vanity Fair.

'Would Joe Biden be running if he thought any of these other folks could beat Donald Trump? No way. We can't risk this thing with someone who has not done this before, who is unchallenged, who is untested. There is something to be said for two old white guys going at it,' he added.

The electability argument doesn't always work. Clinton used it against Sanders in the 2016 primary and ultimately fell to Trump in the general election.

And a new poll out Wednesday showed Biden would crush President Trump by a 10-point margin if the 2020 election were held today.

The Emerson College poll found 55 per cent of registered voters would choose Biden, and Trump would get the other 45 per cent.

Harris, with a 4-point lead over the president, is the only other Democrat who would beat him handily enough to be outside the poll's 2.8 per cent margin of error.