Legislation that would give an infertile wife parental rights to a child born of her husband’s sperm and a donated egg is gaining traction just as the state Supreme Court is considering the issue.

The Gestational Carrier Agreement Act, which passed the Assembly Human Services Committee on March 8, would allow gestational-carrier agreements to declare the wife to be the child’s mother immediately at birth.