How does salt/sugar reduce acidity?

I posted this on the thread about reducing coffee’s acidity before realizing it’s actually a different topic and should probably be in a new thread.

Why do people swear that adding salt or sugar to an acidic food or beverage will reduce the acidity. I’ve seen comments on recipe sites that recommend adding sugar to overly-acidic spaghetti sauce. Wouldn’t that make for slightly sweeter, just-as-acidic spaghetti sauce?

And how would salt added to coffee reduce its acidity?

Is there some chemical reaction I’m not aware of, or does the salt/sugar make us less aware of the acidity when tasting but not when digesting the coffee/tomato-based food?

Neither a nutritionist nor a sensory neurobiologist, but my strong impression is that salt and sugar do nothing to actual acidity (i.e., change the PH of the food). They change the perception of the taste by stimulating different chemoceptors (taste bud sensory nerves) than the ones that would be stimulated by acidity (i.e., “sour”).

Our perceptions blend the taste senses so we don’t perceive sweet+sour as “sweet+sour” but more like “less sour”. (Up to a point, where we perceive sweetness more than sourness… but we never really sense the taste elements separately unless we consciously try to separate them, and then sometimes not even then.)

Thank you! That explains it!