According to Islamic law, the woman must answer with agreement about the marriage, and to be responsible she should reach puberty, which to the female is earlier than the male.
Moreover, this narration that she was a child is not in the Quran which is authentic, but according to some traditions...