A panel of state legislators has approved a bill that would bar people convicted of a child sex offense from serving as foster parents.