What is the problem in terms of accessibility?
The major difference is that now we have empty divs, but does it actually hurt anything?
I have linked another article discussing that: https://www.coryetzkorn.com/blog/dont-fear-empty-divs/
Aparently, having empty divs does not affect screen readers.