-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Windows IA2 support #10
Conversation
tools/wptrunner/wptrunner/executors/executorwindowsaccessibility.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lots of suggestions, but this is amazing.
tools/wptrunner/wptrunner/executors/executorwindowsaccessibility.py
Outdated
Show resolved
Hide resolved
tools/wptrunner/wptrunner/executors/executorwindowsaccessibility.py
Outdated
Show resolved
Hide resolved
tools/wptrunner/wptrunner/executors/executorwindowsaccessibility.py
Outdated
Show resolved
Hide resolved
for i in range(1, root.accChildCount + 1): | ||
child = to_ia2(root.accChild(i)) | ||
if child.accRole(CHILDID_SELF) == ROLE_SYSTEM_DOCUMENT: | ||
if child.accName(CHILDID_SELF) == title: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if child.accName(CHILDID_SELF) == title: | |
if child.accValue(CHILDID_SELF) == url: | |
(Not an actual suggestion to be applied directly, just documenting how we get the URL, if we wanted to do that)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!
resources/testdriver.js
Outdated
@@ -1076,7 +1076,7 @@ | |||
* rejected in the cases of failures. | |||
*/ | |||
get_accessibility_api_node: async function(dom_id) { | |||
return window.test_driver_internal.get_accessibility_api_node(dom_id) | |||
return window.test_driver_internal.get_accessibility_api_node(document.title, dom_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we sent location.href
here instead of document.title
, we could match based on the URL rather than the (potentially ambiguous) title.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea!
tools/wptrunner/wptrunner/executors/executorwindowsaccessibility.py
Outdated
Show resolved
Hide resolved
tools/wptrunner/wptrunner/executors/executorwindowsaccessibility.py
Outdated
Show resolved
Hide resolved
tools/wptrunner/wptrunner/executors/executorwindowsaccessibility.py
Outdated
Show resolved
Hide resolved
tools/wptrunner/wptrunner/executors/executorwindowsaccessibility.py
Outdated
Show resolved
Hide resolved
tools/wptrunner/wptrunner/executors/executorwindowsaccessibility.py
Outdated
Show resolved
Hide resolved
1f854f1
to
d62dfde
Compare
d62dfde
to
2999d87
Compare
This patch does the following:
Requirements: comtypes python library
Running the code is the same as for other platforms:
The code to get access to IA2 interface was very inspired by James Teh's API test infrastructure in Firefox: https://searchfox.org/mozilla-central/source/accessible/tests/browser/windows/a11y_setup.py