This is very common indeed and is just an accident really. Be very understanding and supportive. Explain to her that she should tell the teacher when she needs to use the toilet.
The information provided does not constitute a diagnosis of your condition. You should consult a medical practitioner or other appropriate health care professional for a physical exmanication, diagnosis and formal
advice. Health24 and the expert accept no responsibility or liability for any damage or personal harm you may suffer resulting from making use of this content.