"He wants a cup of tea."
Translation:Он хочет чашку чая.
Хочет puts the rest of the sentence in the accusative case, including чашка and чай, which transform into чашку and чая.
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.
You should use the form "чашку" anyways. But yes, "Ему хочется чашку чая" should work, imho.