If they do ask for a stroke they usually present the area they'd like stroked such as their back by sidling into you.
But if you imagine meeting someone and immediately putting your hand over their head they might think it odd and dogs aren't any different.