When I come across a pool that is non-compliant or has a broken latch I lock them up. There is no excuse for swimming pool fences and latches to be non-compliant.
Frequently we read about young children who have drowned in swimming pools because of carelessness. Young kids love to explore without understanding the dangers of drowning, it only takes seconds for a child to be at risk of drowning.
Pool inspectors should ensure that gates that are not self-latching are secured until fixed.