SAN FRANCISCO — A federal appeals court ruled Tuesday that potential jurors may not be removed from a trial during jury selection solely because of sexual orientation, extending to gays and lesbians a civil right that the U.S. Supreme Court has previously promised only women and racial minorities.