Being anti discrimination started with not discriminating people for things they can't control. Race, gender, etc. Now we're moving into territory of not discriminating against optional things people choose (having children). This is a very significant change, IMO. I wonder how far it can be taken. I think there's a fair argument that since pregnancy only affects women then it counts as gender discrimination. However…
The phenomenon you describe is not new. Discrimination law differs by jurisdiction, but there are various protected classes that may be seen as " optional things people choose ". People will not agree on precisely which such classes truly reflect choice, but some examples may include religion, familial/marital status (and related), political activity/affiliation (and related), pregnancy (and related), military/vetera…
I'm less concerned with the law and more curiou what people actually think about those various types of discrimination, and why. Its a fascinating moral question.