The only reason asking for government identification prior to voting is considered "racist" and illegal is because the people pushing such agendas want more votes and don't care where the votes come from, including illegal aliens, legal aliens, and otherwise people who do not have the right to vote in American elections.
I voted when I was still in California, born and raised American so I have the right to vote. I was never asked for any piece of identification. None. I could have been a Canadian or Briton or Chinese or some other foreign national, I could have been an illegal alien from Mexico or Guatemala and I could have still voted and my ballot counted because nobody checked. I just walked in and voted, identification or citizenship be damned let alone registration.
There's a part of me still questioning the value of my American citizenship and paying my taxes like a good citizen.
Although I did once live in a town where anyone over 16, citizen or not, could vote in the city non-partisan elections. The idea was local government needs all the involvement it could get and if you lived in the city you had a stake in its future. I do believe one had to have a proper visa and so on.