My daughter (just turned 7, diagnosed with Inattentive ADHD) does this from time to time. She doesn’t necessarily wet herself completely, she goes a little in her panties. Basically, she gets so involved with what she’s doing, she doesn’t realize she really has to go to the bathroom until it’s too late. I tell her it’s no biggie and to maybe try she remember to go potty when she first feels the urge. I know that ADHD kids are hypersensitive and any shame or disappointment they feel is multiplied times 100. Staying calm, kind, and letting her know I’m not mad, angry, or upset has helped.