First, that is a statue, not a constitutional guaranteed right
Second, the law has nothing to do with voter law. It protects unequal treatment of people with different races and colors.
You cannot say that all blacks must have ID's but whites do not need them, but saying that everybody, regardless of race, must have one is ok.