Aww, Lois, that's the sweetest story.
I'm a cat lady myself. I have a 20 lb. orange tabby who is a snuggler, but even flapping pajama legs earn an attack. He is always on the hunt.
As to dogs, I've known dogs who only bark at men in baseball caps. I agree that it's likely a bad experience that they've generalized to all people who look similar.