Lights turning on every time I brake

Can someone tell me what is wrong with my Nissan Altima!? Every time I even touch the brakes my cab light comes on and my ‘door ajar’ light comes on! It doesn’t happen when the car is off. The cab lights started coming on about two months ago and it was only occasionally, and the ‘door ajar’ light started like last week, so I thought maybe there was ice in the way of the door so it was open slightly? But both these just got wayyyy worse and now it’s happening every time I touch my brakes, I tried closing my door better twice within 5 miles and it didn’t help. I saw on other posts that the door needs electrical lubricant, and the cab lights might just need to be plugged in better, but is that really the problem when I have both these issues happening at the same time? Please help! It’s really annoying and embarrassing and I don’t know if my car is even safe to drive!

From inside the car push outward on each door to see if the dome light turns on. The door that triggers the dome light while pushing is the one with the failing door ajar switch.

I does sound like you’ve got a faulty door switch. Not an unusual thing. I’ve figured out which door switch is the faulty one by opening each door one by one and pressing the switch button near the latch mechanism manually. A bad switch will usually be obvious; it won’t turn the dome light and door ajar light on and off like it should in a consistent fashion. Coincidentally I had to do that diagnosis just yesterday on my Corolla. Driver’s door as expected. It’s the door used most often. I was able to jiggle it this way and that and get it to start working again.

The relationship to braking , when you brake with the car moving, the nose of the car moves down and the tail end moves up, so perhaps that motion is the reason. Or does this happen even when the car is stopped and neutral? If it happens then, it might not be a door switch and instead be some kind of grounding problem.