-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Bug] Default TabIndex inconsistency on UWP #12433
Comments
To confirm this, try the following code on UWP, pushing an instance of TestWebViewTabIndexPageView onto the NavigationStack. using Xamarin.Forms; using System.Threading.Tasks; namespace ViewsUsingXamarinForms
} With defaultTabIndex set to int.MaxValue, the tab order is as expected (Button, WebView, Button) as per the UWP documentation. If, however, defaultTabIndex is set to 0 (which is what the Xamarin documentation says is the default), the tab order becomes (Button, Button, WebView), which is not what would be expected. |
That's interesting. We followed the UWP documentation when designing this feature, which clearly says that TabIndex of 0 means elements will be added in order of XAML declaration or child collection. #2789 https://docs.microsoft.com/en-us/windows/uwp/design/accessibility/keyboard-accessibility |
Hi, @johnshardman - I'm closing this issue for the same reason I commented on your other issue at #12456 (comment) We no longer advise that TabIndex be used and hope you will have better results with using SemanticOrderView from the XamarinCommunityToolkit, which has already proven to be a more accessible alternative. That being said, if you continue to have any issues, please feel free to reopen this issue! |
Description
The VisualElement.TabIndex property has a default value of 0, as per the code in VisualElement.cs shown here:
However, on UWP, Control.TabIndex has a default value of Int32.MaxValue, as per the documentation at https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.control.tabindex
Either the Xamarin.Forms.VisualElement.TabIndexProperty needs its default value changed to match UWP, or the VisualElementRenderer (and potentially other renderers) need to convert the Xamarin.Forms default value to the UWP default value.
Basic Information
The text was updated successfully, but these errors were encountered: