Once again, I'll use your dive computer as my reference point.
The battery for your dive computer is about the size of the button on your shirt, and not that much heavier. And simce most of these are sealed already, leakage of the chemicals is minimal.
The compartment will be appropriately sealed with an O-ring. And placement would be on the outside of your mask, say on the outer "rim". So even if you were to flood your mask (by accident or design), it would be unlikely that any battery contents would get into your eyes.