When you put your hand down to their head level, they are more likely to take that as a challenge. If you watch two cocks face off you will know what I mean. Stay above them. Children can be spastic if you don't tell them to calm down and respect the flock. I walk through the yard and coops regularly and have a particularly protective and territorial California Gray rooster. He follows me close, but generally doesn't spur me. If he does I laugh at him since I wear boots and jeans. His spurs are rounded so he can't prick me. Sometimes I tell him he's being stupid, and when he flies at me, I catch him, and pick him up, supporting his body. I may carry him around doing other one-handed chores, and eventually put him down. In that case I won the role of dominance. I notice that he keeps his distance after I set him back on the ground. I will offer him hand treats to show I am the hand that feeds. Usually, if you walk calmly, carry yourself with authority as if you don't mind what the rooster is doing, he will not hassle you too much. Following closely is not worthy of being caught. He's just establishing his domain. If he attacks, reach out and pick him up. You would appreciate this type of rooster if a predator was in pursuit of his hens. Roosters are supposed to be tough. We have to allow it and be in control also in the yard, when it comes to our interaction with the flock. The rooster is boss of the flock.
I had a rooster that went after a bobcat. Luckily I was there, and the rooster survived. I loved that rooster and he had my respect.