I have a Picker that allows the user to choose from a collection of pre-defined string values. Those string values are optimised so that they take as little space on the screen as possible. However, when using screen readers (Windows Narrator, VoiceOver, TalkBack), I want the string that is read out to be different to the one displayed on the screen, as the strings optimised to work on small screens are not what you would want to hear when they are read out. Is there any way to specify AutomationProperties.NameProperty (or equivalent) for each item in a Picker?
How to specify AutomationProperties.NameProperty (or equivalent) for each item in a Picker
Xamarin.Forms provides the AutomationProperties.NameProperty property, but it is used for the UI element. The item of Picker
doesn't work like an UI element, we cannot specify the property for each item.
For the function, you could create a 'custom picker' just like the topic. https://stackoverflow.com/a/49405253/11083277
Answers
Xamarin.Forms provides the AutomationProperties.NameProperty property, but it is used for the UI element. The item of
Picker
doesn't work like an UI element, we cannot specify the property for each item.For the function, you could create a 'custom picker' just like the topic. https://stackoverflow.com/a/49405253/11083277
Thanks @Jarvan. That's what I was assuming (although not what I was hoping), that a popup with a ListView might end up being the way to create the effect of an accessible Picker. I thought I'd ask though, as it seems like something many people must encounter when making their apps accessible. I was hoping that the underlying native controls would have support for this scenario, and that XF might expose an API to access that underlying support, even if through an extension method etc.
Thanks again