Q: sway bar on 2007 Suzuki XL-7

Rookie cbe0621eac06868b3efe0d8d1d3611e23c60d3114864ea2ec19a68cfbd3eebab
I hear a rattling noise under my front wheels when i go over bumbs but stops when i step on the brakes. I was told that it was my sway bars and that they would have to be replaced. why would the noise stop if it is the sway bars when i apply the brakes?
(2) Answers
Jack the vehicle up, grab the top of each wheel and the bottom, push the top in and pull the bottom out, do you hear the noise? If so, bearings, pull/push left and right side, tie rods. The Vitara 4 door suffers from sway bar pop out under extreme articulation with over sized tires, is very common, replace the stud that holds the sway bar in place on each side, about $70 Canadian including tax, and about 1 hour for someone with no experience to do. Best guess, no experience on the XL7 however :-(