The Messenger of Allah ﷺ said, "An orphan girl must be consulted regarding herself. If she remains silent, that is her consent, and if she refuses, she cannot be compelled," meaning when she has reached maturity and refuses.
حدثنا قتيبة حدثنا عبد العزيز بن محمد عن محمد بن عمرو عن أبي سلمة
قال رسول الله ﷺ اليتيمة تستأمر في نفسها فإن صمتت فهو إذنها وإن أبت فلا جواز عليها يعني إذا أدركت فردت
[Its chain of transmission is hasan.] Abu Dawud also reported it in the Book of Marriage, chapter on seeking a woman's consent, no. 2093, and Nasai in 6/87, no. 3272, from the hadith of Muhammad bin Amr with the same wording, and Ibn Hibban graded it sahih, no. 1239, 1240. [Ahmad: 4/394, 411]There is also a corroborating narration from Ibn Umar [Ibn Majah, no. 1878], and on this subject there is also a narration from Abu Musa [Ahmad: 4/394, 411] and Ahmad: 2/130, and from Ayesha [Bukhari, no. 6971, and Muslim, no. 1420].