Turing’s work wasn’t fully understood or appreciated until the the 1980s specifically because many of the documents which revealed the extent of his contributions were classified by the UK government until then, and yes because of the social attitudes of the time, particularly regarding his sexuality. Without those two things he would have got far more credit than he actually did.
The declassification, and a thawing of social attitudes toward LGBT people enabled Turing to be recognized as the figure he is today. So yes, file it under equality, diversity and inclusion all you want.