THE COURTS have made 2014 a year of rapid progress on gay and lesbian rights. Now President Obama is pitching in. That leaves Congress as the only branch that has yet to act.

Mr. Obama announced Monday that he will sign an executive order barring federal contractors, which employ about 20 percent of the national workforce, from discriminating against gay, lesbian and transgender people in their workplaces. The news was long overdue: The president promised to sign such an order in his 2008 campaign. In a way it is encouraging that Mr. Obama moves strongly on gay and lesbian rights during election years, because it indicates that a movement that long struggled to gain a foothold in public opinion is succeeding.

Federal rules already prohibit discrimination based on race, color, national origin, religion and sex. Sexual orientation and gender identity have been glaring exceptions. Yes, government contractors generally have their own nondiscrimination rules, so the immediate, practical effect of this executive order may be small. But that merely suggests that compliance won’t be difficult, not that the order is unnecessary. The status quo, a pointedly incomplete nondiscrimination policy, is flatly unfair. Besides, assurances from private companies have neither the certainty nor force of law that federal action brings. The federal government has stepped in to ensure the civil rights of other categories of people who have suffered historical discrimination. Gays, lesbians and transgender people deserve the same consideration.

In fact, federal policymakers should be much more ambitious. Mr. Obama’s reason for waiting to sign this executive order is that he would have preferred comprehensive nondiscrimination policy, which only Congress can approve. Though he was wrong to wait so long, he was not wrong that legislation — covering all workplaces, not just those in business with the federal government — is the right goal. Some states have nondiscrimination laws that cover sexual orientation. Some do not, so a person can still be fired for no other reason than being gay. A bill to make nondiscrimination policy clear and consistent, the Employment Non-Discrimination Act (ENDA), passed the Senate last year, but the House has failed to act on it.

Critics say that passing ENDA would invite lawsuits. Yet states with nondiscrimination laws that protect gays and lesbians have not seen a massive uptick in filings. Besides, prejudice in the workplace is so pernicious that assertive federal policy is warranted. It is Congress’s turn to act.

Principal Pete Cahall, waves a rainbow flag, symbolizing gay pride, at a rally at Woodrow Wilson High School. (Paul J. Richards/AFP/Getty Images)