"He wants a cup of tea."
Translation:Он хочет чашку чая.
My bad, you're right. Чашку is still in the accusative case, but чая would be the genitive. The best explanation I can give is that in a way, the tea belongs to the cup. This would put чай in genitive, not accusative, while чашка remains in accusative because it's the object being acted upon.
Generally I see it as:
Он хочет - he wants Ему хочется - he feels like
An example is "Мне хочется курить, но не хочу." - would translate as "I feel like having a smoke but I don't want to." Even though I'd love a cigarette, I know i shouldn't now.
There could be gray areas where either is okay.