Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] Android: Setting automation properties on a switch does not apply them to the switch #10091

Open
rnic99 opened this issue Mar 25, 2020 · 0 comments

Comments

@rnic99
Copy link

rnic99 commented Mar 25, 2020

Sample

https://github.com/xamarin/xamarin-forms-samples/tree/master/UserInterface/Accessibility
(if you go into the tab order page there is a switch to add automation properties to)

Steps to Reproduce

  1. Apply automationsproperties.setname to the switch on the accessibility sample app.
  2. Load the sample up and navigate via the Tab Order button.
  3. With the accessibility service turned on navigate to the switch at the bottom of the page.
  4. The switch will only say on or off not applying whatever the developer set in the automation properties.

Expected Behavior

The automation properties set on the switch should be read with the "on" and "off" information obtained by the switch. Example AutomationProperties.SetName(switch1, "This is a test") set on a switch should read "This is a test switch button on" or "This is a test switch button off".

Actual Behavior

Setting the automation properties on the switch does not apply the name on the switch and only reads the "on" or "off" text given by the switch.

Basic Information

This issue was addressed previously with another bug report but we are still seeing the issue on android. Setting automation properties on the iOS side works fine and as expected. When hovering over the iOS switch with the automation properties set the switch reads both the properties and its state.

  • Version with issue: XF: 4.5
  • Last known good version: Unaware of one
  • IDE: VS
  • Platform Target Frameworks: Android 9, 8, 7
  • Affected Devices: One Plus 3t, Samsung S9, Nexus 6

Screenshots

The container that is shown here is where the automation properties are being set.
Screenshot_20200325-170209

When the automation properties should be set in the location on the image below
Screenshot_20200325-170335

Workaround

Wrapping the switch in a stacklayout and applying the automation properties to the stacklayout was a solution for us but that was not done on this test app. This solution also isnt best practice as we want the control itself to have automation properties.

Thank you

@rnic99 rnic99 added s/unverified New report that has yet to be verified t/bug 🐛 labels Mar 25, 2020
@jsuarezruiz jsuarezruiz removed the s/unverified New report that has yet to be verified label Apr 22, 2020
@samhouts samhouts added this to the 5.0.0 milestone Aug 13, 2020
@samhouts samhouts removed this from the 5.0.0 milestone Nov 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants