I’ve worked with goats and I can confirm this is true. This one goat thought my hair was hay multiple times (I saw him a lot) and would try to eat it. My hair is a similar color to hay and it’s likely goats see color differently than humans so it likely looked just like hay to him. So I always had to wear a hood when I was petting him so he wouldn’t see my hair and thus wouldn’t eat it.