Great idea, virtually impossible to enforce I’d imagine.
We already do this for discrimination lawsuits. It turns out that you can, indeed, just do things. It's illegal to discriminate on the basis of race, and it can indeed be enforced against employers who do so to the point that employers are very, very careful now to make sure they don't do this.