Is the area to be well-ventilated?, and what type battery are you using? Those are the two key questions, to my way of thinking. If it's a sealed AGM /gel/dry, then fumes from the battery will not be subject to ignition...if you're talking about gas or gasoline fumes and ignition, you'd have to get quite a concentration to readily ignite. I have dealt with switches, batteries, fuel, and sparks in close proximity to each other for years...in hot-rodding and racing. In dragracing, many people (including me) have their batteries straddling the fuel cell in the trunk of their doorcars, and in-between rounds re-charging/re-fueling are done simultaneously, within a foot of each other. I've never seen or heard of any incident when the trunk area has plenty of open air. I've had more problems jumpstarting a car battery; the hydrogen gas build-up in a wet-cell battery can and will easily ignite, with the slightest spark. It happened to me (twice). Once was my fault, the second was my "helper's" fault. I'm more cautious of a wet cell battery than fuel now. I have all my fuel and battery (AGM) stored in my "galley"(in name only), and though I have no switch located near the battery, the 5-gallon gas can is separated from the battery by only a 15" high plywood wall (removable). Just to make sure that the gas can has to be moved before the battery terminals can "spark" during connection/re-connection. The Coleman fuel/stove/lanterns are located up and away from the battery, as is the generator with its fuel supply. There is a 6" diameter vent for the whole compartment to alleviate any fumes of any type, when the hatch is closed.

And of course, there's always a fire extinguisher in each of my vehicles, and inside the door of the little trailer as well.