Question:
Is one allowed to change a baby's diaper and exposing the child's body in front of seforim? Does it make a difference if the diaper is soiled with only urine or with feces?
Answer:
Halachically it is permitted, however it is preferred that it be done in a different room. You should however be careful not to change the diaper or allow the child to be exposed in front of the lit Shabbos candles
Best wishes
Sources:
Halichos Bas Yisroel 7-7 quoting Machazeh Eliyahu siman 5,6. His reasoning is that the ervah of a child is not considered an ervah, and even though the diaper is not just wet but dirty, nevertheless it does not cause the room to be considered a bathroom. Therefore halachically it is permitted. Nevertheless, it isn't correct respect for the seforim, for the child to be left exposed for a while in front of the seforim. Also see Avnei Yoshpe 1-11(4). Also see Mishne Halachos 6-2 that although it is technically permitted, it is incorrect to do so in front of the seforim..." would you change the diaper at a table that everyone is eating?"
Regarding Shabbos candles see O:CH 275-12.