Allowing a master to marry off a slave without her consent is the view of the vast majority of the scholars, although Ibn Hazm seems to have disagreed on this.
أكثر العلماء على أن للسيد أن يكره عبده وأمته على النكاح
Many of the scholars say that a master can force his male or female slave to perform Nikah
— Tafsir al-Qurtubi
لاتفاقهم على أن لمولاها أن يزوجها بغير رضاها
They are agreed that the master has the right to marry her off without her consent
— Fath al-Bari
وإذا زوج أمته بغير إذنها، فقد لزمها النكاح، كبيرة كانت أو صغيرة لا نعلم فى هذا خلافا
If he marries off his female slave without her permission, then the marriage is binding on her, whether she is an adult or a minor (at the time of the contract). We do not know of any disagreement about this
— al-Mughni
I am not aware of a hadith which explicitly says this, but I haven't looked very thoroughly. Without a clear wording or reference to the hadith it is hard to guess what the author of Wikipedia might be referring to.
Wikipedia cites this claim from "The legal and social status of women in the Hadith literature" by Salma Saad, which indeed claims the same, but is again ambiguous about what hadith it has in mind:
This in turn cites "The social structure of Islam" by Reuben Levy, page 80 which says the following:
Reuben Levy does not claim that it is a hadith, rather that this is part of Islamic law. Islamic law can be derived from other than ahadith such as through analogy, consensus, saying of a sahabi etc.
The citation Levy gives is of "Mukhtasar of Khalil bin Ishaq", which is a very concise manual of Maliki fiqh. I do not have access to the edition from 1957 which he would have referenced, however he likely refers to following passage:
وجبر المالك أمة وعبدا بلا إضرار
The owner can force a female or male slave (to marry) when it is without harm
— Mukhtasar Khaleel
Again this records Islamic law and is not a reference to a Hadith.
It should be noted that this is talking about what is permitted or valid, and not about what is preferable. The preferable course is obviously to treat the slave with kindness and to not force them to do anything which they dislike.
However forcing a slave to marry, according to most scholars, is permitted. This applies when there is an interest served by it. For example when there is benefit to the master e.g. by safeguarding his slaves from zina, or by receiving mahr, or by offloading the maintenance and lodging of his female slave to her spouse. He is able to do this just as he is permitted to make the slave perform labor or service without her consent.
The following is among some of the evidence that is cited for the schools of thought that allows or validates marriage without a slave's consent:
-
وأنكحوا ... الصالحين من عبادكم وإمائكم
And marry ... the righteous among your male slaves and female slaves.
— Quran 24:32
فيه دلالة على أن للمولى أن يزوج عبده وأمتة بغير رضاهما
This is evidence that the owner may marry off his male and female slave without their consent
— Tafsir al-Jassaas also ref روائع البيان تفسير آيات الأحكام
This verse allows the owners to arrange the marriage of their slaves, and it does not put a condition of taking their permission. In the absence of any other specific evidence which imposes this condition the default assumption would be that it is not a requirement.
-
عبدا مملوكا لا يقدر على شيء
a slave owned (by someone), who has no power over anything
— Quran 16:75
This verse gives a parable that a slave does not have power over anything. It is a general negation of any agency or ownership by a slave. And that would include over marriage of oneself.
It is implied from the reports about some of the salaf. For example:
عن إبراهيم، قال: كانوا يكرهون المملوكين على النكاح، ويغلقون عليهما الباب
Ibraaheem al-Nakha’i said: The people would force their slaves to marry and would close the door on them
— Musannaf Ibn Abi Shaybah
A master gains benefits from marrying her off, so he should be allowed to do it just like he can benefit from her by selling her, or renting her, or making her do labor, or asking her to earn for him through lawful means. He does not need to obtain her consent to benefit from her because ownership entitles him to gain benefit. The benefits of marrying her off include:
He receives the mahr of marriage according to the majority of the scholars.
He no longer has to provide all of her food and clothing, according to the majority, as that would be shared by her husband after marriage.
His slaves could increase as children born from the slave would become his new slaves.
The slave's chastity is more likely to be protected if she is married. Being unchaste would reduce her price.
The verse about marriage of a free person to a slave woman mentions that:
فانكحوهن بإذن أهلهن
So, marry them with the permission of their masters
— Quran 4:25
However it does not mention taking the permission of the slave herself. This indicates that her consent is not necessary otherwise it would have been worth mentioning here.
A slave is obligated to obey their owner. Marriage would by default be included in this obedience.
The following is among the evidence that is cited by Ibn Hazm which does not allow for marriage of a slave without their consent: