By today's standards, JFK would have been disqualified. But that was 1960. The public's trust for science, medicine and drugs was at an all-time high.
The polio vaccine was only five years old. Life-saving antibiotics had been around for only a generation (or less). Once nominated, the notion that he was taking drugs that would have disqualified any pilot from flying would not come up.
Only decades earlier, a crippled president took the country out of the Great Depression and set the US to military victory. I believe it was asked if JFK had Addison's disease, and the campaign was able to cleverly refute it.