Annoyingly, we've been reading various versions of this article for around twenty years, yet the problems it discusses still exist. Unsure why, and what the solution is.
Basically it’s up to the content generator to produce semantically nice html, whether that’s a fancy editor or a widget toolkit. When I use PrimeVue for example, the generated DOM is chock full of ARIA attributes.