It should be accepted, since Duolingo accepted it in earlier lessons, so at least because of the consistency. For example, last practice in this lesson:: https://www.duolingo.com/skill/de/Common-Phrases/3
Why is Hannah not acceptable ? It seems an equally valid way to spell Anna !
Those are two different names and they are pronounced differently.
Hannah starts with a /h/ sound, Anna starts with a glottal stop /ʔ/.
They're not considered the same name at all in Germany.