I'm assuming you're a native English speaker, so in disagreeing with your above statement, the difference might be regional. However, at least in the Southern US we would absolutely say "Do you want a tea?" We do include the article with tea for sure. Iced tea is very common in the South, so this is something you would hear often at a restaurant for example.
Duolingo is correct. Portuguese does not use inverted sentence order/ auxileries to ask questions, like English does, so you use the same sentence order for a statement. [you prefer coffee or tea] A question mark or a change of intonation when speaking makes this a question. So as você is 3rd person singular, you have to use ´prefere´- the 3rd person present form of preferir. Hope this helps.
Well, I'm just referring to the English case here, but I assume it's similar in Portuguese. "a tea" or "a coffee" indicates that you're specifically offering a cup of something. Without using articles "Do you prefer tea or coffee?" might just be a question about general preference, too.
Is this a way of asking if someone wants tea or coffee, that is being served now? or is it a general question about which you like better? I assumed from the articles that tea and coffee were being offered, so wrote in idiomatic English, "Would you like tea or coffee?" Duolingo rejects that in favour of "Would you prefer tea or coffee?, which is a bit stilted usage in my area.
It can mean both things. As a native, reading the sentence here, I immediately think of the first situation, but it can work for both. Normally, we wouldn't use the articles for the second situation, but using them is pretty common in this kind of context (talking about foods or very known brands/things, stuff like that: "Você prefere Coca ou Pepsi?" == "Você prefere uma Coca ou uma Pepsi?" or "Você prefere Samsung ou Motorola?" == "Você prefere um Samsung ou um Motorola?"). They can have different meanings, but their different meanings do "overlap" in the right situations.
I agree with Duo on not accepting like because the sentence isn't really asking what you like - it's asking which one you prefer over the other: regardless of whether you like them and regardless of the situation (whether they're being served now).
I understand the like would be preferable if this was our first situation... But it may confuse learners regarding the meaning of those two verbs (which is already a little confusing since like and prefer are very close in meaning, so to speak).