Even tests are structured as feature checks (for QA by humans, or soon by AI agents) would be quite useful for devs writing software who have no direct experience with building for accessibility.
Do you think it might be possible to get Apple to open source anything like this? Maybe ex-Apple people who care deeply about these challenges?
click("Enable Frobzinator") is infinitely more maintainable than click(button().index(7)), and if you eventually remove the accessibility description, your test fails, letting you immediately know what's wrong, and whether it's the test no longer up to date, or if you broke something.
A basic understanding of accessibility principles is a requirement if you intend to call yourself an engineer (and work on UI facing elements, of course.)
Any developer can test their software with a screen reader for free. If it's not usable with a screen reader, it won't be usable to screen reader users. The problem is that almost nobody who isn't Blind will do this, or even consider doing it. They'll effectively build an entire UI flow without running through it even once. If you're lucky, they'll work at a company that has some policies and checklists for accessibility and they'll follow that. If you're really lucky, they'll pay to have someone else do accessibility QA. But even just testing it yourself the way it's going to be used would be a huge step up.
Some examples from iOS: The iPhone wallpaper change gesture is easy to trigger, losing that favorite photo, and needing assistance to go into the settings and fix it again. A big issue I saw was popup context menus can cause confusion when accidentally touching a message in the wrong way. Another was a regression in the latest iOS, in the messages app, when you write a long message, you can't scroll up to what you are replying to; previously you could minimise your draft at least and then scroll up. The photos app clip object feature with its silvery object outline caused delight, despite the feature itself not being used at all, just accidentally.