Interestingly, it appears that teabag paper commonly includes "food-grade" polypropylene, which doesn't readily decompose. The link contains a quote from Tetley, amongst others:
The material used to make the actual tea bag is a mixture of mainly
cellulose fibres and a small amount of polypropylene fibres to give
the heat seal. Under normal composting conditions the cellulose fibres
will break down, as will the tea, leaving the very small polypropylene
fibres which are normally so small they are not seen.
Learning the above isn't going to stop me composting teabags, but the brand of tea may make a difference as to the severity of the problem. I found this description of substantial frustration with the remaining fibres left after composting (please ignore the advice from the tea company to burn them instead! Burning plastic is a terrible idea). I would also draw the line at composting nylon teabags (I wouldn't buy them either), which thankfully doesn't appear to have caught on since this 2007 article discussing the concept was published.
I wouldn't worry too much about a few steel staples in my compost; I'm confident they will readily corrode and won't make any significant difference to the chemical composition of my garden, or my health (after eating the harvest). Iron oxides are already generally abundant in soil.
That leaves the paper tag and a piece of thread to consider. The paper tag, provided it's not coated with plastic, should be ok in small quantities.
If the thread is cotton, it will easily decompose. After a few careful web searches, I didn't manage to find evidence that anything else is used.
Wikipedia notes that corn starch ("Soilon") and silk are also used for tea bags, which don't appear to include polypropylene.
All that said, I can taste the difference between tea bag tea and loose leaf tea; the loose leaf tea tastes better, and is easy to handle with a one-serving strainer. Just don't gulp the dregs at the bottom of the cup!