This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 56079 - Accessibility Support doesn't work in XAML
Summary: Accessibility Support doesn't work in XAML
Status: VERIFIED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms (show other bugs)
Version: 2.3.5
Hardware: PC Windows
: Normal major
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-05-07 00:41 UTC by Adam
Modified: 2017-06-29 11:05 UTC (History)
7 users (show)

See Also:
Tags: ac
Is this bug a regression?: ---
Last known good build:


Attachments

Description Adam 2017-05-07 00:41:42 UTC
Hopefully I am not missing something obvious here, but if I try to use any of the following in XAML

<Entry Accessibility.Hint="Hint" 
       Accessibility.IsInAccessibleTree="True" 
       Accessibility.LabeledBy="Me" 
       Accessibility.Name="Name"
       Text="Hello" />

I get the following error.

Type Accessibility not found in xmlns http://xamarin.com/schemas/2014/forms

If I bind it in the code, it works fine, and the narrator (in UWP) is picking these up fine.

entry.SetValue(Accessibility.HintProperty, "howdy");
entry.SetValue(Accessibility.IsInAccessibleTreeProperty, true);

In 2.3.5, I get a different error in XAML of no static property GetHint.

Either way, 2.3.4 and 2.3.5, I can't get any accessibility to work when setting it in XAML.
Comment 1 Paul DiPietro [MSFT] 2017-05-08 16:12:53 UTC
Hi Adam, the blog post was mislabeled and the feature should be in 2.3.5. I apologize for the incorrect info being placed there and the post should now be updated to reflect the correct version.

As for the issue being present in 2.3.5, locally I found that there is some sort of issue with LabeledBy not parsing correctly on my end (although removing it appears to let the app run and the Narrator works), so I'm going to get some attention on this.
Comment 2 Adam 2017-05-08 23:58:28 UTC
I tried again in 2.3.5 -pre1 and -pre2

This XAML
<Entry Accessibility.Hint="Hint" 
       Accessibility.IsInAccessibleTree="True" 
       Accessibility.LabeledBy="Me" 
       Accessibility.Name="Name"
       Text="Hello" />

Produces this error

Position 8:6. Missing a public static GetHint or a public instance property getter for the attached property "Xamarin.Forms.Accessibility.HintProperty"

I can not get any Accessibility options in XAML to work at all.
Comment 3 Dan Rigby 2017-05-09 01:20:13 UTC
I'm seeing the same error locally when attempting to add the Accessibility.Hint, Accessibility.IsInAccessibleTree and Accessibility.Name attributes in XAML:

"error : Missing a public static GetHint or a public instance property getter for the attached property "Xamarin.Forms.Accessibility.HintProperty""
Comment 4 Samantha Houts 2017-05-09 17:03:09 UTC
https://github.com/xamarin/Xamarin.Forms/pull/911
Comment 5 Rui Marinho 2017-05-10 12:16:53 UTC
Should be fixed on 2.3.5-pre3
Comment 6 Stephane Delcroix 2017-05-10 12:18:23 UTC
LabeledBy should be set using `{x:Reference}` markup extension
Comment 7 Gaurav Ganorkar 2017-06-29 11:05:59 UTC
Verified this issue on the build info below

Microsoft Visual Studio Enterprise 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.6.01586

Installed Version: Enterprise


Xamarin   4.6.0.279 (de55d19)

Xamarin.Android   7.4.0.13 (f6289cd)

Xamarin.iOS   10.12.0.12 (494fcbc)

Forms.Version 2.3.5.255-pre5

Issue is Fixed now.

Note You need to log in before you can comment on or make changes to this bug.