AndreiMisiukevich / CardView

CardsView | CarouselView | CoverflowView | CubeView for Xamarin.Forms
MIT License
711 stars 114 forks source link

Screen reader issues #385

Closed IeuanWalker closed 3 years ago

IeuanWalker commented 3 years ago

Hi,

The screen reader on iOS (haven't tested android) doesn't stay on the current slide and starts readying stuff from the other slides.

Attached is a vid of what is happening. https://user-images.githubusercontent.com/6544051/116270371-ed0d8d80-a776-11eb-8d5f-49f18d4f213e.MOV

AndreiMisiukevich commented 3 years ago

Hey, I don't know how to help with that. This is a very tricky.

You can try to set IsEnabled to False for none selected views.

AndreiMisiukevich commented 3 years ago

Or you even can make next/prev items invisible (don't forget to make them visible again before navigating)

AndreiMisiukevich commented 3 years ago

Or this approach

var b = new Button();
b.SetValue(AutomationProperties.IsInAccessibleTreeProperty, false); // False to remove from accessibility tree or True to add

it will help to remove unnecessary elements from the accessibility tree.

I mean make current view's elements accessible and make unaccessible all other elements

AndreiMisiukevich commented 3 years ago

I propose next approach

1) In your data template view make all elements IsInAccessibleTreeProperty = false 2) Subscribe ItemDisappearing event and perform setting IsInAccessibleTreeProperty = false to all elements as well (Work with CurrentView) 3) Subscribe ItemAppeared and perfor setting IsInAccessibleTreeProperty = true to all elements on CurrentView

if you wish, I can add a new event "CurrentViewChanged" for easier implementing this approach. But unfortunately you will have to do it on your side, because side views are added to screen for soother animation.

AndreiMisiukevich commented 3 years ago

I implemented something. Please try 2.7.7

IeuanWalker commented 3 years ago

@AndreiMisiukevich Your fix worked :D thanks so much

AndreiMisiukevich commented 3 years ago

@AndreiMisiukevich Your fix worked :D thanks so much

Then need to implement something similar for Android

AndreiMisiukevich commented 3 years ago

Need to do the same, but set importantForAccessibility = no-hide-descendants

AndreiMisiukevich commented 3 years ago

Implemented for android in 2.7.8

IeuanWalker commented 3 years ago

@AndreiMisiukevich Great thanks.

I haven't started looking at android accessibility atm. But will let you know if there are any issues :)