You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Microsoft.UI.Xaml, we need a lot of code to create an automation peer for each Control even if the real change away from an template is just one line of code.
Below is an example of accessibility implementation in react-native, and it's very easy to use by customer.
It's possible for WinUI to provides dynamic automation peer which can allows customer to change the automation properties in an declarative way in XAML without a customized automationPeer implementation.
Note:
Microsoft has an internal proposal before on 'XAML developer can use Controls that support UIA patterns conditionally, based on their context of use'. This proposal is not used to address that problem.
Code duplication between Control and it's automation peer. Although control and its AutomationPeer are one on one binding, in implementation, they are in separate classes. So most of time, actual implementation is in Control itself, and automation peer is just a delegated object. In AutomationPeer, we always get its owner, then query the actual control to get the
In control, Dynamic AutomationPeer would look up the customizedDictionary to provides the localized automation name.
Supports Pattern implemented in Control.
Currently, Pattern are implemented in AutomationPeer, now we can move it to control.
For example, IExpandCollapseProvider is implemented in TreeViewItemAutomationDataPeer, it's possible to just implement it in Control. Dynamic automation peer has the ability to figure out its control and invoke the patterns in the control.
Scope
Capability
Priority
Allow control to define default settings for Automation Name, control Type, supported Pattern, and localized Key
Must
Allow declarative accessibility change in XAML for AutomationName, ControlType, supported patterns and localized Key
Must
Allow pattern implementation in Control itself
Should
Allow customer to intercept the localization look up process and provides customized dictionary
Should
Important Notes
Open Questions
The text was updated successfully, but these errors were encountered:
@licanhua sounds great! Next step would be to grab a pitch slot on the calendar and pitch it!
The email thread we had about this also brought up an old spec, did you read through that and look at the open questions from that previous spec review?
Proposal: Provides Dynamic AutomationPeer
Summary
In Microsoft.UI.Xaml, we need a lot of code to create an automation peer for each Control even if the real change away from an template is just one line of code.
Below is an example of accessibility implementation in react-native, and it's very easy to use by customer.
It's possible for WinUI to provides dynamic automation peer which can allows customer to change the automation properties in an declarative way in XAML without a customized automationPeer implementation.
Note:
Microsoft has an internal proposal before on 'XAML developer can use Controls that support UIA patterns conditionally, based on their context of use'. This proposal is not used to address that problem.
References:
Rationale
Painful experience on RadioButtons' implementation
RadioButtons where in order to change the ListViewItem automation control type to RadioButton, To support it:
6 files and 3 new public types all for one line of code!!
When do we requires a new automation peer?
what we don't need an new AutomationPeer, but needs code change in Control
What's the problem of current implementation?
Proposal
Customer registers a dictionary which provides localization for any key
then customer declare the key in XAML to request a customized value in above dictionary.
In control, Dynamic AutomationPeer would look up the customizedDictionary to provides the localized automation name.
Currently, Pattern are implemented in AutomationPeer, now we can move it to control.
For example, IExpandCollapseProvider is implemented in TreeViewItemAutomationDataPeer, it's possible to just implement it in Control. Dynamic automation peer has the ability to figure out its control and invoke the patterns in the control.
Scope
Important Notes
Open Questions
The text was updated successfully, but these errors were encountered: