I'm working through this grammar book, which goes into a lot of detail about the grammar of questions and when the explanatory の/ん needs to be included. On pg. 284, the book says that a question must include の/ん if the following is true:
疑問文中に疑問語 (疑問詞) が含まれている (疑問語疑問文の) 場合
With more details further down the page:
なお、疑問語 (疑問詞) を含んでいてもその疑問語 (疑問詞) が述語に含まれているときは名詞文と同じ構造になるので、「のだ」は必要ではありません。
In summary, a question containing an interrogative that isn't the final predicate must include の/ん. Examples: 「田中さんは何を見たのですか。」「田中さんが見たのは何ですか。」(The book also notes that this rule isn't always followed in beginner Japanese language education, even though sentences that don't follow this rule would sound unnatural to native speakers.)
Edit: Just to clarify further, this rule only applies to questions as part of a sentence's main clause. The book notes that relative clauses would not apply. Example: 「私の留守中にだれが来たか教えてください。」
But, on pg. 287, the book lists the following question forms as valid (where ↑ = a rising tone):
だれが来ますか。
だれが来ましたか。
だれが来ます↑。
だれが来ました↑。
だれが来る↑。
だれが来た↑。
These two pages seem to contradict each other. How can the structures on pg. 287 be valid without の/ん, if the rule on pg. 284 is true? The book doesn't clarify this, and I'm not sure what I'm missing.