I don't think the accessibility story on Linux is comprehensive enough to make this possible unfortunately. Especially with Wayland. One advantage Mac apps have is they're all targeting the same underlying OS primitives, which is the layer their accessibility platform lives at.
There is AT-SPI2:
https://invent.kde.org/sdk/selenium-webdriver-at-spi
I'm a heavy Linux user interested in accessibility and I didn't even know this existed.
Quote from a sibling comment:
Unfortunately AT-SPI support is very hit or miss, mostly miss. To get it useable for this required a huge amount of modification. See my other comment for context.
The levels of support are radically different. Compositors, window managers, UI frameworks, and apps all have mixed and inconsistent levels of support such that the overall experience is that you simply cannot rely on using a Linux system via accessibility.