I don't think the issue is using declarative UI frameworks, it's that the rendering engines these frameworks are outputting to are not taking accessibility into account.
Clearly no one put thought into any of that. It was just “make terminal, but pretty”.