That is more a case of including people who are not exclusively white, heterosexual and male.
I want to address this point as I think this framing may be somewhat deceptive, in that it seems to imply that D&D was this cloistered monastery within which only straight, white males were allowed - and everyone else actively kept out. Certainly, there used to be (and still is, to some extent) a "gatekeeper" phenomena, but this also has to do with fear of geekdom becoming mainstream, not simply a matter of excluding everyone other than straight white men. And it was "practiced" by a minority of, well, socially awkward dudes who were likely afraid of women. The majority of RPG players are, and have generally always been, open and accepting of any and all who are interested in the hobby--at least that has been my impression.
Again, this is not to say that gatekeeping didn't exist, or that there weren't elements of the "boy's club" phenomena, but if you time travelled back to 1984 and visited a dozen D&D clubs and groups, most of them would be accepting of female and/or non-white players. Maybe a bit surprised or suspicious at first ("Wait, why would a girl want to play D&D?!") but not antagonistic, and mostly due to not being used to non-white dudes being interested in the game. Being, a relatively benign ignorance or non-exposure rather than outright hostility to the "other."
I think the primary factor is that culture has shifted so that being a geek--to whatever degree--is more accepted. We see waves of this through the mainstreaming of geek stuff with Harry Potter, anime, the Lord of the Rings movies, Game of Thrones, the MCU, etc. With this, a wide range of demographics has become interested in the game, or at least more prominent. A
Nerds and geeks of all demographics have always existed, and I'm not sure there's a way to assess numbers over time except through memory and anecdote. But there may also be, as it has become more socially acceptable, a kind of mass "coming out of the closet" of geeks and quasi-geeks. Meaning, it isn't only that more people have become geeks or nerds, but more people have embraced their "geeky side." So "geekdom" is less an either/or, and more a matter of, "What are you geeky about?"
That said, I don't think this "de-shunning" of geek culture or geekery is sufficient to explain the huge current popularity of D&D. It is part of it, but I think there is something to the game that people yearn for, which has to do with a more organic, imaginative experience that can be shared with friends. But that's a bit of a different topic.