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

[Bug] Accessibility Name and HelpText for Label visible in Android UI #9707

Closed
Poli97 opened this issue Feb 25, 2020 · 1 comment
Closed

Comments

@Poli97
Copy link

Poli97 commented Feb 25, 2020

Description

Accessibility values added on empty Label are visible in Android UI
Same as this issue, but with Label.

Steps to Reproduce

  1. Create a Forms project
  2. Add an empty Label, with a background and a certain size, to the Layout
  3. Set the label in accessible tree with AutomationProperties.SetIsInAccessibleTree(label, true)
  4. Set an accessibility name to it with AutomationProperties.SetName(label, "Test accessibility name")
  5. Run the app in emulator or physical device

CODE SAMPLE:
C#

Label label = new Label
            {
                BackgroundColor = Color.Orange,
            };
            AutomationProperties.SetIsInAccessibleTree(label, true);
            AutomationProperties.SetName(label, "Test accessibility name");
            AbsoluteLayout.SetLayoutBounds(label, new Rectangle(0.5, 0.5, 0.3, 0.2));
            AbsoluteLayout.SetLayoutFlags(label, AbsoluteLayoutFlags.All);

            absolutelayout.Children.Add(label);`

Expected Behavior

An empty label with no text should be displayed

Actual Behavior

In the label it is shown the accessibility text set with AutomationProperties.SetName(label, "Test accessibility name"), in this case "Test accessibility name" is shown. (In native Android ContentDescription works fine and doesn't show any text).

Basic Information

  • Version with issue: All the latest tried, 4.3 and 4.4 and also pre release 4.5 pre 4
  • Last known good version: none
  • IDE: Visual Studio for Mac 8.4.6 (build 36)
  • Platform Target Frameworks:
    • Android: 9.0, API 28
  • Nuget Packages: Xamarin.Essentials 1.3.1 and 1.4.0
  • Affected Devices: Seems on all android devices

Screenshots

image

Reproduction Link

Git repo

Workaround

@Poli97 Poli97 added s/unverified New report that has yet to be verified t/bug 🐛 labels Feb 25, 2020
@pauldipietro pauldipietro added this to New in Triage Feb 25, 2020
@jsuarezruiz jsuarezruiz added a/a11y 🔍 p/Android and removed s/unverified New report that has yet to be verified labels Feb 25, 2020
@jsuarezruiz jsuarezruiz moved this from New to Needs Estimate in Triage Feb 25, 2020
@samhouts samhouts added this to Backlog in Accessibility Feb 28, 2020
@samhouts samhouts added this to the 5.0.0 milestone Aug 13, 2020
@samhouts samhouts added this to To do in vNext+1 (5.0.0) Aug 14, 2020
@samhouts samhouts removed this from the 5.0.0 milestone Nov 2, 2020
@PureWeen
Copy link
Contributor

PureWeen commented Jan 7, 2022

Please try SemanticEffect on the XCT xamarin/XamarinCommunityToolkit#1240

The behavior of SemanticEffect is much more accurate

@PureWeen PureWeen closed this as completed Jan 7, 2022
Triage automation moved this from Needs Estimate to Closed Jan 7, 2022
Accessibility automation moved this from Backlog to Done Jan 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Accessibility
  
Done
Triage
  
Closed
Development

No branches or pull requests

4 participants