Currently the accessibility system is only enabled for macOS if VoiceOver is enabled. XCUITests are based on the accessibility tree, however, which means that there are use cases for explicitly enabling it.
Example STR:
- Make a macOS plugin that uses some native UI (e.g., file_selector)
- Try to write XCUITests for its example app, since Flutter integration tests won't work (due to modal native UI, which Flutter tests can't drive)
- Neither recording nor running the test works, unless VoiceOver is on.
What I'd like to do is just force-enable accessibility in the example app. I don't care if performance suffers slightly in that case, since it's just for testing. (Alternately, if there's a way that we can detect that it's running in this case and enable it automatically, like we do for VO, that would work.)
/cc @chunhtai This is follow-up from recent Discord discussion; I've now verified that just running an XCUITest doesn't trigger the necessary system calls to enable it.
Currently the accessibility system is only enabled for macOS if VoiceOver is enabled. XCUITests are based on the accessibility tree, however, which means that there are use cases for explicitly enabling it.
Example STR:
What I'd like to do is just force-enable accessibility in the example app. I don't care if performance suffers slightly in that case, since it's just for testing. (Alternately, if there's a way that we can detect that it's running in this case and enable it automatically, like we do for VO, that would work.)
/cc @chunhtai This is follow-up from recent Discord discussion; I've now verified that just running an XCUITest doesn't trigger the necessary system calls to enable it.