Although I may not have an answer completely, however my 10 year old(soon to be 11) daughter, still has a problem with accidents.
We narrowed it down to her being too focused on an activity and gets side tracked from going to the potty. She also has encopresis, and has frequent accidents.
We set a reminder timer for her so every 20 minutes when it goes off we remind her to go.