First of all, sorry for my bad english abilities.
I'm facing lock on random element using VoiceOver swipe when some elements visibility is updated by network events for exemple.
So I've check PageContent.cs where are VoiceOver accessibilities functions.
And I share you my thinking on some lines :
Hello Xamarin.Forms Team,
First of all, sorry for my bad english abilities. I'm facing lock on random element using VoiceOver swipe when some elements visibility is updated by network events for exemple. So I've check PageContent.cs where are VoiceOver accessibilities functions. And I share you my thinking on some lines :
1) https://github.com/xamarin/Xamarin.Forms/blob/5a96f79252125705a50e12fce7bcb1125f52cf15/Xamarin.Forms.Platform.iOS/Renderers/PageContainer.cs#L69 Expected value seems to be
nil
(https://developer.apple.com/documentation/objectivec/nsobject/1615084-accessibilityelementatindex?language=objc) but seems thatNSNull.Null
isn'tnil
(https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/NumbersandValues/Articles/Null.html)2) https://github.com/xamarin/Xamarin.Forms/blob/5a96f79252125705a50e12fce7bcb1125f52cf15/Xamarin.Forms.Platform.iOS/Renderers/PageContainer.cs#L72 If
index
is out of bound aSystem.ArgumentOutOfRangeException
isn't supposed to be thown ?3) https://github.com/xamarin/Xamarin.Forms/blob/5a96f79252125705a50e12fce7bcb1125f52cf15/Xamarin.Forms.Platform.iOS/Renderers/PageContainer.cs#L77 The return type should be a
nint
regarding the next points.4) https://github.com/xamarin/Xamarin.Forms/blob/5a96f79252125705a50e12fce7bcb1125f52cf15/Xamarin.Forms.Platform.iOS/Renderers/PageContainer.cs#L80 Expected value seems be
NSNotFound
(https://developer.apple.com/documentation/objectivec/nsobject/1615078-indexofaccessibilityelement?language=objc) that is more likenint.MaxValue
thanint.MaxValue
.5) https://github.com/xamarin/Xamarin.Forms/blob/5a96f79252125705a50e12fce7bcb1125f52cf15/Xamarin.Forms.Platform.iOS/Renderers/PageContainer.cs#L83 If
element
doesn't exists in the ListIndexOf
seems to return-1
(https://docs.microsoft.com/fr-fr/dotnet/api/system.collections.generic.list-1.indexof?view=netframework-4.8) that is not so close toNSNotFound
.Thanks for reading Thanks in advance for your feedbacks
Best Regards,
Jean