Reference: al-Muntaqaa min Fataawa Shaykh Saalih al-Fowzaan – Volume 5, Page 32, Fatwa No.40
Question: What is the ruling regarding a small child under the age of 2 years passing infront of the one praying; is it imperative that he is prevented and not allowed to do so?
Response: Yes, it is not permissible to leave a young child to pass infront of the one praying, and the child is not [accountable for the] sin because he has not [reached the age where he is] responsible. However, whoever is beside the one praying is sinful if he is able to prevent him from doing so because the Prophet ﷺ ordered that the passerby be prevented from passing infront of the one praying [Saheeh al-Bukhaaree (1/129) the hadeeth of Abul-Jahm (radhi-yAllaahu ‘anhu)].