How to make your D&D game accessible to everyone

Long ago, in the mists of time (ie, in the mid 1980s, when I first discovered D&D), the experience of playing the game was rather like this.
You kept it quiet, it was very uncool and to be uncool was to invite public ridicule and potentially an opportunistic kicking. Yes, you could be beaten mercilessly for having a D20.
You kept it quiet, it was very uncool and to be uncool was to preclude oneself from ever being romantically successful at school, which was hard enough aged 14.
You kept it quiet because, well, there was no internet anyway and the only people you had to tell things to were the same half dozen nerds you had grown up with.
Unless you were at an advanced level of nerdery where you went to games conventions or bought RPG magazines (no to the first, yes to the latter), you existed in something of an fantasy silo, with oneself and aforementioned half dozen nerds.
They say that the past is a foreign country and they do things differently there, and this is indeed the case. Whatever one might say about the present moment, the 1980s were certainly more homophobic, on the whole more racist (though the current moment is giving 40 years ago a good run for its money), and definately more sexist.
If there were enormously diverse RPG groups then, where male and female BAME, LGBT players got to speak their truth and be their authentic selves and act out fantasy adventures together in an environment where they felt safe and cared about, they were extremely rare.