Virginia is facing a growing shortage of affordable housing, but apartment developments aiming to fill that gap often don’t make it far when they come before local governments for approval.

“You hear things as offensive as, ‘We don’t want those people in our neighborhoods,’” says Del. Jeff Bourne, D-Richmond. “The implicit and explicit NIMBYism that happens when these plans and these projects are coming before local bodies is pretty apparent. You don’t have to be a rocket scientist to understand what they’re saying.”

Bourne and Sen. Jennifer McClellan, D-Richmond, are pursuing legislation in the General Assembly this year that would explicitly prohibit local governments from denying permits for housing developments because of the expected race or income levels of the residents.

The legislation passed the Senate with broad support last week, when McClellan described the outcry that followed a proposal to build 235 apartments in Powhatan County last year. Local officials rejected a zoning application after some neighbors worried it would “lay the groundwork for a ghetto,” as one resident put it in an email to the board.

“In their mind the affordability was public housing,” McClellan said. “And someone actually stood up and said we do not want Gilpin Court coming to our community,” a reference to a public housing community in Richmond.

The dynamic is hardly unique to Powhatan, developers say. The mere mention of HUD financing on a sign outside a construction site in a wealthy Chesterfield County neighborhood drew 300 concerned residents to a community meeting. (The project in question wasn’t actually pegged as affordable, it was just utilizing a U.S. Department of Housing and Urban Development loan program, according to the Chesterfield Observer, which covered the story.)

McClellan has proposed similar legislation in the past, but says this year local governments are more receptive because they increasing appreciate the need for affordable housing, and so far no one has spoken in opposition to the legislation as it’s made its way through the General Assembly.

Perhaps unsurprisingly, the bill has the enthusiastic endorsement of the apartment industry. They point to studies that show one in three households in the state spends more than 30 percent of their income on housing, a number researchers expect to rise as the state’s population grows and housing supply affordable for middle and lower-income families stagnates.

“We’re just so far behind right now, and sometimes that vocal minority, that stigma, is what’s holding us back,” said Andrew Clark, director of government affairs for the Home Builders Association of Virginia.

It’s unclear how big an impact the legislation would actually have if passed. NIMBYism is far from the only problem limiting the construction of affordable housing. Factors such as rising construction costs play a big role, too.

Race-based denials are already prohibited by federal fair housing law. And while neighborhood residents are sometimes explicit that their opposition is based on a project’s status as affordable, local officials more commonly couch rejections on technical grounds, such as traffic.

That’s what happened in Powhatan last year, where the developers of the project have threatened legal action over the decision.

Powhatan County Attorney Thomas Lacheney responded that the Board of Supervisors primarily based their rejection on the fact that the project was next to a cement plant. “Just because citizens come and make accusations, my supervisors are more sophisticated than that,” he said.

Bourne says he still thinks it’s an important step to take. “I’m sure there are examples of a development having multiple reasons for rejection, but any decision based on this is one too many,” he said.

McClellan’s bill has been referred to the House Committee on General Laws.