Since I bring my dog to work with me, I have a kiddy gate like the one pictured to keep her corralled so she won't get out without my supervision and endanger herself.
The gate latches by pushing the lever down until the far edge snaps below the safety interlock. To open, you slide the interlock back to free the lever and raise the lever.
Totally amazing to witness the quantity of intelligent adults that struggle opening this simple mechanism. Where as any kid that has visited gets it in one go and takes less than 3 seconds to figure it out.