It is prohibited to walk in front of the praying person unless there is emergency or extreme necessity. Also, the praying person should put a sutrah in front of him in case there is possibility of people passing in front of him. In addition, one should avoid talking in the presence of the praying person so as not to disturb him.
Sheikh Muhammad Nur Abdullah, President of the Islamic Society of North America and member of the Fiqh Council of North America, states the following: “First of all, the praying person should take a sutrah for him. A sutrah means to take anything that would mark his place of sujud (prostration) and prevent people from interrupting his Salah or walking in front of him.
As for walking in front of someone who is praying, it has been reported that the Prophet (peace and blessings be upon him) said: “If the person knows the sin of walking in front of the praying person, then he would have preferred to stay for forty years rather than doing so.”
So, it is haram to walk in front of the praying person, unless there is an emergency or extreme necessity to do so.
If someone wants to go and can’t find a way out, then he can easily put a chair, a book, or the like in front of the praying person [for a sutrah] and then go [by passing on the far side of the sutrah, not passing between the person and the sutrah].
As for talking in the presence of the praying person, it is reported that the Prophet (peace and blessings be upon him) forbade the people from reading the Qur’an too loud so that they wouldn’t bother one another. By analogy, it is not allowed for people to raise their voices or talk in front of the praying people because that will confuse them and make them perform Salah without humility and concentration.
It is also reported that `Umar ibn Al-Khattab (may Allah be pleased with him) build a shade for the people away from the masjid so that whoever wanted to say poetry would go there and thus not confuse those who were praying.