Extend testdriver.js and wptrunner to test AAMs (platform accessibility APIs) #53733
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds an extension to
testdriver.js
in order to test accessibility API, as defined by the ARIA, Core-AAM and HTML-AAM specifications. The RFC to extendtestdriver.js
in this way can be found here. The decision to open a PR with these changes was made at TPAC 2024.The change in this CL:
a. The product name ("chrome", "firefox", etc) is passed back to the executor level. This is necessary because accessibility APIs are exposed externally to the browser, and we need to find the browser in the accessibility API by name. Ideally, this will be done by PID (to allow for parallelization), but that requires some changes to chromedriver and safaridriver.
b. The option
--force-renderer-accessibility
has been added when runningwpt run
against chrome.executorplatformaccessibility.py
andtools/wptrunner/wptrunner/executors/platformaccessibility
: these executors run tests against platform specific accessibility APIs, so there is an executor for Linux, Windows, and macOS. The Windows and macOS ones are proof of concepts and will need more work. The Linux one is fully featured and can run all of the tests added in this PR.To run tests on Linux:
Notes about macOS and Windows
On Windows and macOS, even with the following dependencies, these tests will fail with the message "Fail: Test not implemented".
Thanks to @alice for the macOS code and thanks @jcsteh, the code to get IA2 interface was very inspired by the firefox test infrastructure: https://searchfox.org/mozilla-central/source/accessible/tests/browser/windows/a11y_setup.py
macOS dependencies:
python -m pip install pyobjc-framework-Accessibility pyobjc-framework-ApplicationServices
To run against Firefox, you need to turn on VoiceOver the screen reader.
To run against Chrome, you need to include --no-headless.
Windows dependencies:
Requirements: comtypes python library