A child having accidents at school can be a result of the child not asking to use the toilet or not going to the toilet due to fear of the school restrooms.
Some children are also too shy to ask the teacher to let them use the toilet and then it results in the child wetting their pants at school.
This was common with me in Kindergarten and First grade.
I was a shy kid and would not ask the teacher until the very last minute or not ask at all and would try holding it and eventually would wet my pants which resulted in my mom having to come and bring me some clean pants.
If your child constantly has accidents at school it would be a good idea to send them in a pull up to hold any accidents should they have them.
Anxiety can cause incontinence in children and cause daytime wetting.
Stress as well as anxiety can cause kids to wet their pants.
Kids going through stressful situations can lead to daytime wetting or pants wetting.
The psychological problems and reasons in children with daytime wetting are phobias or fears associated with toilets or anxiousness and emotional upset.
Some kids who daytime wet have fears or phobias of going into public toilets such as in schools and will hold it to the point the wet their pants.
Daytime wetting is common in children who are emotionally upset or anxious.
Daytime wetting in children can also be caused by urinary incontinence, weak bladder, or occur when the child laughs, jumps, runs or coughs.
And some children may be too involved in play and not pay attention to when they need to use the toilet so they just pee in their pants.
Constipation also commonly causes daytime wetting or enuresis, apparently because the stool mass irritates the bladder and decreases its storage volume.
Emotional stress, such as post-traumatic stress disorder, sexual abuse, or other major life changes, can lead to regressive behaviors such as incontinence.
It's normal for kids to have the occasional daytime wetting accident but if it constantly occurs then the child may have a health issue that needs checked out.
If the child is constantly wetting their pants then they should ideally wear a pull up or diaper to contain the urine and keep their pants clean.