John McCain and Barack Obama 's campaigns swapped accusations of rampant and widespread voter fraud Friday as legal battles over who ought be allowed to cast a ballot ensnared the race to the White House .