I would lean towards a dirty idle control valve. The reason all those lights came on is because when the engine was stalling, the alternator wasn't spinning so it wasn't charging the battery or feeding power to any of the other systems that need a steady supply of current to operate. The battery light comes on when there is a problem with the charging system, not specifically for the battery itself. Remove the ICV and clean it thoroughly with carburetor cleaner. Then let it dry for about 30 minutes before reinstalling in the car. You should be good to go after that.
My wife's Murano just had the same issue and removing and cleaning the throttle body (chamber) fixed it.
The battery light (has nothing to do with spark plugs) comes up first because the RPMs are so slow the alternator is not spinning fast enough to make the requisite amount of voltage. Not the problem.
Test: With the engine at idle, car in PARK & just sitting - Put on the brakes. IF the idle gets rough & lumpy when the brakes are on, check the vacuum booster on the power brakes for a leaking diaphragm.
Year, make, model, engine size, mileage...and I promise you'll get a good answer, otherwise not likely.
On my way to school yesterday, my car started to stall every time I was driving below 10 mph or at a stop. First my battery light comes on, the oil light, then my engine light. I have to put it in park, turn the car off and turn it back on in order to keep driving. Driving it home, it initially drove fine then started to started to stall again. I have a few ideas on what it might be, the idle air control valve might be bad or dirty, my friend also mentioned it might be the spark plugs considering the battery light comes up first. If you have any ideas on what it might be or how I can fix it, anything would be much appreciated! Thanks!