Classification is only a human thing tough. Biologically speaking, Federer and Djokovic are as close to each other as Djokovic and Thiem, that's the only objective difference. And nobody would say that a player who hit his best years only after the other one was well past his own ones belongs to the same era.
Djokovic could have peaked earlier, 2011 was too late, this doesn't mean he is a next gen. He has been facing Federer since 2006, just because he was not winning slams for next 5 years thats his problem, not anyone else's. Nadal's rise proved it that they are same generation, just 1/2 gen apart. Federer's true next gen is Grigor Dimitrov who turned pro in 2008, Federer was going down at a time when another athlete shows up (Grigor), this means by the time Grigor enters his prime in 2010s Federer was in 30s, so if they are equal skilled players then there is no overlap of any sort of prime level performance. That is how you classify generation.
In other words --- Roger Federer could have avoided Rafael Nadal and Novak Djokovic entirely if they were born 10 years and 11 years after him respectively instead of the standard 5 & 6. In the 10-11 scenario Nadal+Nole would be actual next gens, their 1st slams would come in 2010 and 2013 respectively, Federer would already be in his 30s by then and he would just not be able to forge long rivalries with them, he would lose almost all the matches from the beginning (he already be on 22 slams in 2010, so it wouldn't matter anyway) and he could have retired by lets say 2016 citing that I went down to next gens Nadal and Djokovic, now it is their times and so I leave. This would have Federer's state ..... However IRL he could not avoid Djokodal because are only 1/2 apart from him, not a full gen. Nadal was taking clay slams from Federer in Federer own peak because that is how it was always meant to be, next gens don't beat you at a slam when you are not even 24 years old.