The great majority of the time, whether or not you list your ADHD on your job applications will have ZERO impacts on your chance of employment (It's neither positive nor negative).
Here is the info from the US Equal Employment Opportunity Commission:
Employers aren't allowed to ask for medical information until they offer you a job, and they aren't allowed to ask for your genetic information - including family medical history - except in very limited circumstances.
(NOTE: I will talk about these "limited circumstances" in my last paragraph of this answer.)
Here is the link to the US Equal Employment Opportunity Commission:
I have seen many online software engineer applications that have the "optional" section to ask about candidate's medical history, and the companies clearly state that this medical info is NOT sent to hiring managers and is NOT used to decide whether to hire or reject a candidate.
It seems that no one within those companies is allowed to know exactly which candidate has which medical condition.
Instead, that medical info is sent directly to some government agency because these companies either are the contractors for the government or receive some grants from the government, and therefore, these companies may be required to interview a wide variety of applicants in terms of race, gender, disability, etc...
Even for companies that are not government contractors, they still want to send this kind of info to the government to show that they are inclusive and pro-diversity. Again, of course, (with some legitimate exceptions that I will mention at the end of my answer) these companies are NOT allowed to know which candidate has which medical condition, and is NOT allowed to use this info to hire or reject a candidate.
Has any of you (software engineering managers) actually learned about the medical history of the candidates that you are interviewing from their job applications ? Let me know if you do. But, I don't think the hiring software managers are supposed to know.
Maybe, if you apply for jobs in another industry that requires you to lift heavy objects and to operate heavy industrial equipments, then it is OK for the company to ask how much you weight can lift and if you have any medical condition that may prevent you from doing these jobs safely.