General counsel need to work more closely with human resources departments if they want to avoid the kinds of explosive discrimination allegations recently made against Tesla Motors Inc. and Uber Technologies Inc., an employment defense attorney said.

And as long as companies don’t improve their diversity numbers, these types of complaints could continue, an employment plaintiffs attorney said.