Avoid contact with the substance at all times. Place the batteries into a plastic bag before recycling them. Clean out the battery holder with a dry cotton swab. In case of contact, wash your hands thoroughly with soap and water.
Batteries will become unfit to use after they’ve been in the water. Usually however, a battery won’t leak inside the washing machine thanks to the safety valve - so chances of your textile being affected are minimal.