Accidentally Swallowing Food when Tasting it While Fasting
Question

My wife asked me to help her make iftar, and while I was helping her I checked the food for salt, forgetting that I was fasting. Did I break my fast by doing that? Because I was doing something that was not obligatory upon me according to Shari`ah or according to custom?
Praise be to Allah.There is no harm for a fasting person to taste food as needed. They can do so by sampling it with the tip of their tongue and then spitting it out, regardless of whether they are a man or a woman.
If the fasting person forgets and accidentally swallows it , there is no sin upon them, and they can continue their fast. This is in accordance with the general interpretation of the evidence which indicates that, according to Islamic law (Shari`ah), the person who forgets is excused. 
The Prophet (peace and blessings of Allah be upon him) said: “Whoever forgets that he is fasting and eats or drinks something, let him complete his fast, for it is Allah Who has fed him and given him to drink.” (Agreed upon. Al-Bukhari, 1399; Muslim 1155)
For more, please see these answers: 22833 , 12589 , 78438 , and 172499 .
 And Allah knows best.