Lawmakers on Tuesday objected to a Facebook feature that allows advertisers to target housing ads to exclude certain racial and ethnic groups from promotions and marketing.

In another race-related development that affects tech companies, the National Bureau of Economic Research in Cambridge, Massachusetts, said a study had indicated a pattern of discrimination by drivers of ride hailing apps against both African Americans and women.

“We are writing to express our deep concerns with reports that Facebook’s 'Ethnic Affinities' advertising customization feature allows for advertisers to exclude specific racial and ethnic groups when placing housing advertisements,” Congresswoman Robin Kelly, a Democrat from Illinois, G.K. Butterfield, chairman of the Congressional Black Caucus, and two other representatives wrote in a letter to Facebook CEO Mark Zuckerberg.

The legislators were reacting to a ProPublica report last week that said that Facebook’s ad portal allowed advertisers to target specific groups and exclude users based on their “ethnic affinities,” using data that the social network has collected on its users. ProPublica purchased an ad that was placed in Facebook's housing categories.

The targeting of ads based on data collected by internet companies has been a cause for concern by a number of users and rights groups, and the selective display of the ads based on race or ethnic group is likely to be very controversial, according to analysts.

“Multicultural marketing is a common practice in the ad industry and helps brands reach audiences with more relevant advertising,” Facebook said in a statement. “We've heard from groups and policy makers who are concerned about some of the ways our targeting tools could be used by advertisers. We are listening and working to better understand these concerns."

But the legislators argue that by allowing online advertisers to “promote or market a community or home for the purpose of sale to select an ‘ethnic affinity’ as part of their advertising campaign, Facebook is complicit in promoting restrictive housing practices."

Race issues have figured also for ride-hailing companies. NBER said it had sent passengers in Seattle, Washington and Boston to hail nearly 1,500 rides, and it was observed in Seattle that waiting times for African American passengers increased by as much as 35 percent. “In Boston, we observed discrimination by Uber drivers via more frequent cancellations against passengers when they used African American-sounding names,” according to the report. “Across all trips, the cancellation rate for African American sounding names was more than twice as frequent compared to white sounding names.”

Another on-demand company, Airbnb, averted a proposed class-action lawsuit on Tuesday from users accusing their hosts of racial discrimination, after a judge in the District of Columbia ruled that the company's arbitration policy prohibited customers from suing, according to The New York Times.

Race has been a hot-button for tech companies not only in their operations but also when it comes to hiring. Civil rights activist Rev. Jesse Jackson was able to highlight the need for diversity in hiring by the tech sector, and got some commitments from companies like Intel, but the percentage of blacks among the U.S. employees of most tech companies remains in the low single digits.

That the issue of diversity in hiring is likely to come up at every opportunity was reflected in the letter this week by the lawmakers, who said that diversifying the ranks of Facebook, specially in senior management positions, will better reflect the diversity of the social network’s users and ensure that “innovative and inclusive platforms continue to be promoted by your company.”

Programs or polices that could be in violation of civil rights laws or are racially insensitive would also be subject to a “more robust and inclusive" vetting process, according to the letter.

To comment on this article and other PCWorld content, visit our Facebook page or our Twitter feed.