This is true.
However California is an at will state, you don't have to disclose why you fired someone. And I've been verbally informed at all of my jobs in California that I shouldn't disclose what I make. So in practice it seems that people are strongly encouraged to keep what they make secret.
Furthermore when I worked in New York I was informed that it was a legal requirement that I not disclose. And I have no reason to doubt that that was the law there.