After New York state lawmakers approved legislation last month to remove the option for parents to forgo vaccinating their children on religious grounds, a group of families filed a lawsuit Wednesday aimed at reversing the measure.

Robert F. Kennedy Jr., who has previously expressed public skepticism about the safety of vaccines, is one of two attorneys representing the families in the litigation.