-
Notifications
You must be signed in to change notification settings - Fork 29.7k
[Windows] Restore and enable IAccessibleEx implementation #175406
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
base: master
Are you sure you want to change the base?
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group. |
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.
Code Review
This pull request restores and enables the IAccessibleEx implementation, which exposes new UI Automation capabilities to the MSAA-based accessibility implementation on Windows. Specifically, it adds an identifier to SemanticsNode to expose AutomationId for UI testing. The changes correctly plumb this new field through the accessibility bridge and update relevant documentation and tests. My review includes a minor correction for the updated documentation to improve its accuracy.
engine/src/flutter/shell/platform/common/flutter_platform_node_delegate_unittests.cc
Outdated
Show resolved
Hide resolved
e9f2195 to
cceb784
Compare
7954197 to
a4f81de
Compare
|
@loic-sharma could you review this updated PR ? |
|
@loic-peron-inetum-public Thanks for the pull request! I'm a little concerned that this change might regress Flutter Windows's accessibility support in unexpected ways as a similar change to add UI Automation had caused unexpected problems. Could you include details on how you verified this change? What scenarios did you test? |
|
Regarding how we use and tests this proposal: We are building an application targeting iOS and Windows. We automate black-box tests using Appium on both platform. We use a custom build of the flutter engine for Windows that includes the required PR to get Semantics::identifer to be exposed as AutomationId. The application is not evaluated on its accessibility for actual users. Regarding UI Automation-related regressions: I understand that switching to UI Automation required a full switch in the accessibility interface exposed by Flutter. It seems that IAccessibleEx is a way to extend IAccessible-based exposition with the additional capabilities offered by UI Automation, without jeopardizing existing baheviours. What are the unexpected ways that triggered unexpected problems and regressed Flutter accessibility support during a previous attempt to switch to UI Automation ? How can I check them ? |
I would manually check that a sample Flutter Windows app still works well with JAWS, NVDA, and Windows Narrator. I'd make sure that as you tab around, the screen reader properly announces content, without any differences compared to today's implementation. Could we de-risk this by making the Flutter Windows's API has a Could we update Here's what this API might look like: // Configures the accessibility implementation used by Flutter.
enum class AccessibilityMode {
// Default value. Flutter will automatically select the best available
// implementation.
Default,
// Use the IAccessible implementation.
IAccessible,
// Use the experimental IAccessibleEx implementation.
IAccessibleEx,
};
class DartProject {
// Sets the accessibility implementation used by Flutter.
void set_accessibility_mode(AccessibilityMode accessibility_mode) {
accessibility_mode_ = accessibility_mode;
}
}To opt-in to the flutter::DartProject project(L"data");
project.set_accessibility_mode(flutter::AccessibilityMode::IAccessibleEx);Then, |
|
Note to self: these docs are an excellent resource to review this PR: https://learn.microsoft.com/en-us/windows/win32/winauto/implementing-iaccessibleex-for-providers |
I will try and implement an engine-runtime configuration option in november. Could this be enabled using an application-buildtime |
Sadly, no. The Windows embedder doesn't have an easy way to read Dart defines. The suggestion I left above means that the app developer will need to update the C++ code in their Flutter Windows entry point (example). |
|
Is progress still being made on this? |
Hi, yes I still work on this, but I have little work-time currently allocated for this tack. I still work to map the way from Would it be acceptable to use a technical attribute in |
Could you say more about why you need this? I think it's OK to add more data to |
may I know what property you want to add? also is |
Activation would be for the entire application. I agree this is is an abuse of AXNodeData. I currently struggle to access How do you see propagating IAccessibleEx acitvation from |
a4f81de to
43f1ba9
Compare
|
First try to make implementation opt-in at runtime: currently uses a simple boolean to enable/disable IAccessibleEx, enable by default for my use case and tests. |
Restore and enable IAccessibleEx implementation.
Exposes new features of UI Automation to MSAA-based implementation.
Specifically usefull to expose AutomationId from SemanticsNode::identifier for UI test automation.
see #148763
Followup to #161955
Pre-launch Checklist
///).