The Supreme Court on Monday added what could be landmark issues to its docket for next term: whether federal anti-discrimination laws protect on the basis of sexual orientation and gender identity.

The court accepted three cases for the term that begins October. They include a transgender funeral home director who won her case after being fired; a gay skydiving instructor who successfully challenged his dismissal; and a social worker who was unsuccessful in convincing a court that he was unlawfully terminated because of his sexual orientation.

The cases shared a common theme: Whether Title VII of the Civil Rights Act of 1964, which forbids discrimination on the basis of sex, is broad enough to encompass discrimination based on gender identity or sexual orientation.

Some states protect gay and transgender workers, but federal courts have split on whether federal law provides protection.

Few would venture that Congress had transgender and gay Americans in mind decades ago when prohibiting discrimination on the basis of sex. But the Equal Employment Opportunity Commission and some courts have said that the language is broad. The Obama administration thought so, the Trump administration has taken the opposite stance.

The U.S. Court of Appeals for the 6th Circuit, said it was "analytically impossible" to not take into account a person's sex when deciding to fire them for being transgender.

"Discrimination 'because of sex' inherently includes discrimination against employees because of a change in their sex," the court ruled.

It was considering the case of Aimee Stephens, who had worked for R.G. and G.R. Harris Funeral homes for six years as Anthony Stephens. "At the end of my vacation on August 26, 2013, I will return to work as my true self, Amiee [sic] Australia Stephens, in appropriate business attire," Stephens wrote to co-workers.

But two weeks later, the company's owner, Thomas Rost, fired Stephens. Rost acknowledged firing Stephens "because he was no longer going to represent himself as a man. He wanted to dress as a woman."

Alliance Defending Freedom, the conservative legal group, defended Rost and asked the Supreme Court to review the 6th Circuit's "startling decision to change what it means to be male and female."

In its brief, lawyers said it was reasonable for Rost to conclude "the employee's actions would violate the company's sex-specific dress code and disrupt the healing process of grieving families. The language of Title VII does not mandate that result."

But Stephens's lawyers noted that the 6th Circuit had an alternative reason for ruling for their client: a 1989 Supreme Court decision that said it was illegal to discriminate against workers because they did not conform to gender stereotypes.

The cases involving sexual orientation had procedural problems as well.

One involved Donald Zarda, a gay sky-jumping instructor. Zarda jokingly told a woman who was going to be strapped to him in a diver not to worry because he was gay. But she and her boyfriend later complained that Zarda had touched her inappropriately. The company, Altitude Express, dismissed him, and Zarda sued.

But Zarda died in 2014 in a base-jumping accident in Europe, and his case was carried forward by his sister and a former partner. His estate won, but there were questions about whether the now-dissolved company for which he worked can be held liable.

The U.S. Court of Appeals for the 2nd Circuit did rule, though, that the anti-discrimination law protected Zarda.

"Sexual orientation discrimination is a subset of sex discrimination because sexual orientation is defined by one's sex in relation to the sex of those to whom one is attracted," it ruled.

The U.S. Court of Appeals for the 11th Circuit ruled the other way, in a short order based on circuit precedent. It ruled against Gerald Lynn Bostock, who said he was fired from his job as a social worker after his employers discovered he was gay. Clayton County, Ga. contended Bostock's firing had nothing to do with that.

The cases are Bostock v. Clayton County; Altitude Express Inc. v. Zarda and R.G, and G.R. Harris Funeral Homes v. EEOC.