For those that have a vented battery, it's important that those vent tubes hang well below the bike and away from frame components.
Don't ask how I know
This is definitely good advice.
However, also remember that this tube (usually clear on modern batteries) vents out battery gases, especially when it’s warm and fully charged.
I was grinding a part of my frame once, down by the foot pegs, when a spark flew across the open end of this battery vent tube. The battery exploded, blowing the lid off and shooting battery acid straight up. I was crouched down below the lid of the battery, so I was fine, but if I’d been looking down at it, I’d have been blinded and/or permanently scarred.
Don’t do any grinding or welding near a lead-acid battery or its vent tube.