They should always put signs like that on dogs. Whenever I see a dog waiting somewhere, I think "Poor guy, probably would like some attention." and more often than not, they look at you expectantly, tail wagging. But my default assumption is always that a dog owner doesn't want everyone to mess with his dog, so I leave the dogs alone.

I always just pet the dog anyway, even if it's only briefly. Anyone who brings his dog out in public should be able to expect people who want to pet it. It would be selfish of them if it were otherwise, in my opinion.