Anyone who answers directly either yes or no your question about
aftermarket work "voiding the warranty" does not understand warranties.
Warranties expressly cover manufacturing defects, and not damage or failure as a result of unapproved modification. If the manufacturer can show that the "problem" is a result of work done by yourself or a third party, then they need not cover it.
If they cannot show that the issue is not a "defect" in manufacture, then they are obliged to repair.
i.e. - if you get your oil changed at Bob's Quick-E Lube (disclaimer - invented shop name, I hope) and the engine blows, then the manufacturer would have to show that Bob used wrong oil, or too much, or too little - they just can't say "Oh, you had work done elsewhere, we won't cover".
Obviously, the type of modification can make it easier or harder for a manufacturer to disclaim. Oil/Tires/Brake maintenance will be very unlikely to cause rejection, but if you were to install an
aftermarket chip, most manufacturers would challenge any engine problem, and beating them might be a low-odds game involving expensive lawyers, so think carefully about major
mods.
A corollary to this - manufacturing defects are only covered for the time limit specified in the limited warranty. Many people think that if a problem is a factory defect, that it should be covered beyond the warranty term. This is not true. i.e. if you suddenly discover a gross manufacturing defect, such as that they forgot to install a part, one day after the time limit is up, they are not legally obliged to remedy, although any reputable firm would make at least some effort to resolve the issue to your satisfaction if it was confirmed to be a true factory screwup.
Wiki "Magnuson-Moss Act"for US specific consumer warranty details.
I do this for a living (albeit not in automotive or consumer products).