Businesses are doing all they can to keep operating while minimizing the spread of the virus. But some have run into an unexpected obstacle: federal law.

In May, as the first wave of the pandemic receded, Connecticut put out guidelines for workplace reopening. “Individuals over the age of 65 or with other health conditions should not visit offices, but instead continue to stay home and stay safe.” That seemed like a sound directive, but as lawyers soon pointed out, the state had told its private employers to violate federal law. The federal Age Discrimination in Employment Act makes it unlawful to deprive older employees of any opportunity offered to younger colleagues.

You might think being assigned to work from home at full salary doesn’t count as being deprived of an opportunity, but trial lawyers have been known to argue otherwise. An at-home employee might have fewer promotion opportunities or benefit from less mentoring. Someone could try for a class action.

That isn’t an isolated example. For some employers a reopening plan might include using antibody tests to identify which employees had Covid and recovered; given likely immunity, those persons could be a good bet for jobs where personal contact is unavoidable. But June guidelines from the federal Equal Employment Opportunity Commission count antibody testing as a breach of the Americans with Disabilities Act (ADA). The commission says tests for current infection are OK.

What about vaccination before coming back to work? The EEOC recently said it thinks employers are free to require Covid vaccination in most situations. But some employees will demand to be excused under religious or disability accommodation, and that can get chancy and expensive. In 2018 the EEOC extracted a $75,000 settlement from a Tennessee hospital that had refused to grant an employee a religious exception from its mandatory flu shot policy.

As with the oldest employees, those with pre-existing medical conditions are a vulnerable group. But under the ADA, you can’t just ask them whether they have a condition. If you happen to know, you can’t assign them to at-home work unless you can show that coming in would pose a “direct threat” to their health. Mere elevated risk isn’t enough.

It’s true you’re allowed to bring up these issues with vulnerable staffers in hopes they will volunteer. But watch out: An adverse lawyer might characterize such a conversation as “steering.”

Another group of employees is a risk for virus spread—maybe they live with an immunocompromised spouse and two elderly parents. Alas, per the EEOC, the Genetic Information Nondiscrimination Act “prohibits employers from asking employees medical questions about family members.”

Requiring customers to wear masks should be mostly OK under the ADA as a “legitimate safety requirement.” That didn’t keep people from filing lawsuits at a regular clip this summer—nine in one week in May—claiming that mask policies were ADA violations.

Word soon got out that if you didn’t feel like wearing a mask, you should tell the store manager that you had a medical condition. The ADA has no language requiring a customer who demands an accommodation to provide a doctor’s note or even identify what his or her disability is. So even if the manager strongly suspects the store would be vindicated in the end, the less risky course is to back off.

Federal law limits management’s right to disclose things it may know about employees’ medical conditions. That complicates the task of warning staff when a co-worker falls sick and might have been contagious. The EEOC advises resorting to vague phrases like “someone on the fourth floor.” When the rumor mill starts to run, the company may be legally unable to set matters straight.

Universities fall under the Family Educational Rights and Privacy Act, or Ferpa, which limits disclosure of information about students, even to some people with a reasonable interest in knowing. Faculty have complained that administrators fretting about Ferpa have refused to inform them about outbreaks involving students in their classes.

What about forehead temperature gun screening at the door? The American Civil Liberties Union has assailed temperature checks as potentially overstepping various civil-rights laws, noting that they are far from perfect as a screen. Some contagious people aren’t running a fever and some who are running a fever don’t have Covid.

But good virus precaution is a matter of layering less-than-ideal screens, which can add up to sound overall protection. If seven screens are used, each of which knocks out 40% of risk, total risk can be reduced by 97%. If three of the seven screens are removed, effectiveness falls to 87%.

And businesses can wind up sued if they do and sued if they don’t. If a customer believes he caught the virus on the premises, his lawyer will be glad to seize on testimony that you didn’t use temperature guns and let some visitors run around without masks.

In a saner world, Congress might rewrite these laws to immunize companies from liability for actions taken in reasonable response to health and safety risks, and develop provisions for granting emergency waivers in circumstances like those now. But most of these laws make minimal concessions to balancing costs and benefits. All of us—including the most vulnerable—pay the price for such moralism in lawmaking.