The lawsuit came after Republicans blocked ambitious federal legislation this week to protect voting rights.