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

Accessibility issues when AccessibilityElements are updated while VoiceOver have already get some data #10425

Open
@jlemanbeto

Description

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 :


Expected value seems to be nil (https://developer.apple.com/documentation/objectivec/nsobject/1615084-accessibilityelementatindex?language=objc) but seems that NSNull.Null isn't nil (https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/NumbersandValues/Articles/Null.html)

return AccessibilityElements[(int)index];

If index is out of bound a System.ArgumentOutOfRangeException isn't supposed to be thown ?

int GetIndexOfAccessibilityElement(NSObject element)

The return type should be a nint regarding the next points.


Expected value seems be NSNotFound (https://developer.apple.com/documentation/objectivec/nsobject/1615078-indexofaccessibilityelement?language=objc) that is more like nint.MaxValue than int.MaxValue.

return AccessibilityElements.IndexOf(element);

If element doesn't exists in the List IndexOf 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 to NSNotFound.

Thanks for reading
Thanks in advance for your feedbacks

Best Regards,

Jean

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions