I don't know why but every time I see a black person's afro, I want to pet it.
That would be quite rude, are you fascinated with a black person's hair that much?
Well I've seen both black and white people with afros.
Everyone's hair is different so it is natural to be curious. Simply ask the person before hand and it won't be a big deal.
But they may say that they don't want me to pet their hair, and I would be so disappointed.
I can see how you would be disappointed, but touching someone's hair without their permission is no different than touching any other part of their person. Instead, compliment their hair politely to show your appreciation.