Alabama lawmakers on Wednesday advanced legislation that would define who is recognized as female and male under state law.