Accidents happen. They'll happen all her life. It's not a big deal. Even mom's have accidents, then tell her a time when you didn't make it to the bathroom in time. If you've never had one then tell her something else. She needs to know things happen and it's not a big deal.
IF she's getting a stomach virus then she may have another one this evening and tomorrow. She needs to know they sometimes happen.
If you don't have a personal story you can tell her them by all means tell her this one. You have a "friend" that has a 10 year old daughter and she had an accident in her leotard at dance one evening. She didn't know she had to go, it just came out. She was really embarrassed and went to tell her mom. They got her cleaned up and changed her into something else. She went back to class and no one knew she had an accident.