The proposed legislation would make it illegal for prisons to house inmates according to their gender identity.