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

[Bug] Xamarin Forms Accessibility for the Layout<View> child ContentView label text not working. #13796

@jeyakasipandi

Description

@jeyakasipandi

Description

We have created a custom Layout to add the ContentView Label when select the view label text not accessible.

[XAML]

    <local:CustomView AutomationId="CustomLayout" VerticalOptions="Center"  HeightRequest="300" WidthRequest="300" BackgroundColor="Aqua" >
        <ContentView BackgroundColor="Yellow" HeightRequest="300" WidthRequest="300">
            <Label Text="LabelText" FontSize="25" HorizontalOptions="CenterAndExpand" VerticalTextAlignment="Center"/>
        </ContentView>
    </local:CustomView>

[C#]

    public class CustomView : StackLayout
    {
        public CustomView()
        {
            this.SetValue(AutomationProperties.IsInAccessibleTreeProperty, true);

            AutomationProperties.SetName(this, this.AutomationId + "LayoutItem 1 of 1");
        }
}

If enable IsInAccessibleTreeProperty for both the CustomView and ContentView. The voice over will be only Label text.

Expected Behavior

While select the view the voice over should be LabelText + LayoutItem 1 of 1.

Actual Behavior

The child view text not accessible.

Basic Information

XF version 4.8

Environment

Visual Studio 2019

Screenshots

image

Sample LInk

Accessibilitydemo.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    a/a11y 🔍a/labels/needs-info ❓A question has been asked that requires an answer before work can continue on this issue.t/bug 🐛

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions