Democrats and Republicans alike were more conservative in the past. So as "right-leaning" as the Democrats were the Republicans were even further to the right than they were. So claiming that Democrats were on the right and Republicans were left back in the days of slavery is a misnomer.