My daughter is doing the same thing. She's 3.25 and having at least one pee accident a day. Usually she's right in front of the toilet, trying to get her pants off, when it happens. I think she gets too busy to pay attention to her body's signals, until it's a dire emergency, and then she just doesn't make it to the toilet in time.
I've noticed that it's more likely to happen at certain times, so I now insist that she try to pee, or at least wash her hands, at certain times (like before we watch TV or eat meals). Just being in the bathroom to wash her hands seems to trigger the recognition that "Hey, my bladder's full...gotta pee!" without me having to tell her "GO PEE!"