The two short stories have several elements in common. In Gordimer's story of Dr. von Leinsdorf and the unnamed young female cashier who becomes intimately involved with von Leinsdorf, the law and the police and a time in jail separate them as it is against The Immorality Act of 1927 for people to engage in interracial intimacy. In Chopin's story, the [unknowing] interracial couple is separated by social constraints, social humiliation, and social pressure caused by the birth of their non-white infant. Both are similarly separated albeit for different reasons.
In Gordimer's story of Thebedi, Paulus, and Njabulo, the interracial couple is separated by Thebedi's required marriage to an African man; her groom's name is Njabulo, and he has long loved her, even while she loved Paulus. They are further separated by the birth of Thebedi's child who turns out to be white--an indication to all that she has had prior illegal relations with Paulus and that the baby is in fact not Njabulo's offspring but Paulus's. The final separation comes when Paulus murders the infant rather than have his child of disgraceful mixed races in the world.
There was on its head a quantity of straight, fine floss, like that which carries the seeds of certain weeds in the veld. The unfocused eyes it opened were grey flecked with yellow. Njabulo was the matte, opaque coffee-grounds colour that has always been called black .... (Gordimer)
In Chopin's story, not only the baby of mixed race dies, but Desiree dies as well. In fact, the infant dies at Desiree's own hands at the same time that she takes her own life. So while in both stories, a parent takes the life of a mixed race infant, in Gordimer's the parent is the father and in Chopin's the parent is the mother. Another point in common is that both Desiree and Thebedi marry into mono-racial marriages (or so Desiree thought) yet have mixed race babies.
[Desiree] stayed motionless, with gaze riveted upon her child, and her face the picture of fright. ....
"Armand," she panted once more, clutching his arm, "look at our child. What does it mean? Tell me." (Chopin)
A point not in common between the stories is that in Chopin's, the interracial couple is ignorant of their backgrounds, while in Gordimer's both interracial couples are well aware of their backgrounds and their racial identities [and of the laws governing their racial relations].