I've been teaching my kids that if they want to stroke a dog, they have to ask the owner if it is okay first. It gets a bit of a mixed reaction - some people are overjoyed that I haven't done that "There is a feral beast, keep away before it eats you" thing. Some people say no because their dog is funny around children (awesome, this is why the kids need to ask first).
However, some people seem to think it's a bit weird for kids to want to stroke their dogs. AIBU to do this? I like dogs a lot (and the kids LOVE them) but don't have one myself (we live in central London, it isn't practical).