I was diagnosed with Leber’s hereditary optic neuropathy (LHON) last year. It's degenerative and it's possible that I completely lose my eyesight in the next 3 to 5 years. I really want to become a programmer, but I know that programmers stay in front of screens a lot to write code. I'm really losing the motivation to pursue my dream.
I think it might be helpful to rephrase the question to: "am I passionate enough about programming to pursue it through the significant hurdles I face?" If the answer is yes, then it is absolutely possible and you can find a way to do it. It'll be hard and frustrating, but few passions worth pursuing aren't.
If the answer is no, then it's a moot point.