No one should be judged for their preferences in a marriage partner. At the same time, it is a mistake to fixate on one factor in place of looking at the person as a whole. All of us marry people who are imperfect. Perhaps we fall in-love and become blinded to those imperfections, but for sure they exist.
Illness – whether physical or mental – should be an important consideration when considering suitability for marriage, along with many other factors. They are not inherently more or less of a reason against dating or marriage than any other issue. It would depend on the severity of the problem, along with all the other features of the person.