L.A.
There could be many reasons for the accidents at school.. Could be he is having too much fun to want to stop.He gets distracted or just plain does not want to deal with it. .
Could be you are more in tune to when he needs to go at home and tend to send him signals or make suggestions of potty time.. At school there is a classroom of kids, so teachers are not focused on any one child all of the time.. You just need to remind him to go when he needs to go. He will not miss out on fun, but he will if he has to stop and have all of his clothing changed.
Also 3 year olds are way more emotional than 2 year olds.. They are like little balls of raw emotions.. They have some of the words, but they are now beginning to have sympathy, empathy and still be self centered (not in a bad way).. all of this is like a year of PMS for some of them..
Try to have some extra patience with him. He is changing into more of an independent child, but he is still a "baby child" in many ways and still needs to be cuddled and guided sometimes.. Especially when changes in schedules, changes in locations and when tired..