Roberts was hospitalized last December and the situation was so serious that his wife Georgina was given no guarantee that the 27-year-old would pull through.
“I had pneumonia and I was in hospital for a few days, I was really struggling,” said Roberts, who will start as right wing-back in Wales’ World Cup opener against the United States on Monday.
“My wife was at home and she was asking the doctors ‘is he going to be OK?’
“The doctors couldn’t actually give her the answer that I was going to be all right because a high percentage of people who have what I had didn’t actually make it.
“So, the fact that I am still playing, and can still do what I do, is a good thing.
“My life has changed a lot – I’ve got a baby daughter (Elsie) now, so when I get the chance to play football I try and do my best. But if I’m useless, who cares? When I go home and see her, no-one can take that away from me.
“Before, when I didn’t play as well I wanted to go home and beat myself up about it. I would say to family and friends: ‘I’m useless. I’m done with football.’ But now I have a different perspective.”
Roberts has established himself as a Wales regular since breaking into the set-up under former manager Ryan Giggs in 2018.
The Burnley defender has won 41 caps and one of his three international goals came in the memorable 2-0 victory over Turkey at Euro 2020.
Noted for his enthusiasm and huge energy levels, Roberts feared his illness would have a lasting effect on his career.
He said: “I did worry about it because it affects the lungs and I had to have numerous scans.
“I was told from the people who read those scans that what I had was severe. It wasn’t a small thing.
“Everyone knows I like to get up and down when I play, and run all day, so my lungs are obviously a massive part of the ability to do that.
“But when I came back for Burnley at the back end of last season, I felt sound. We have since qualified for a World Cup, so I can’t be doing that badly.”
Despite Qatar hosting football’s first winter World Cup, the heat will still be a major factor in Doha.
Wales’ second game with Iran on November 25 kicks off at 1pm local time and temperatures are expected to be around 30C (86F) at the Ahmad Bin Ali Stadium.
Asked if he can get up and down the flank in those conditions, Roberts said: “I’ve been on holiday a few times to Dubai and I like to run in the boiling heat, so it will be just the same.
“Whenever I am wearing the Wales jersey, I feel I can run all day. I will just keep on going and going. It could be 100 degrees and it wouldn’t bother me.
“It’s nothing I haven’t experienced before. I’ve played in Croatia and in Baku and other places, so I’ll be fine.”
Roberts is known as the ‘Crynant Cafu’ due to his attacking strengths being compared to that of the former Brazil right-back, his country’s most-capped player and a two-time World Cup winner.
“I think my mates started saying it, but I don’t know whether they had heard it from somewhere else,” Roberts said.
“Everyone says it now. His record is decent…but he could only dream of being from Wales.”