-
Notifications
You must be signed in to change notification settings - Fork 838
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[iOS Accessibility] Bugfix: VoiceOver always seeing fields for all entry types #1213
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps a custom render, or renderers would be appropriate or if there is another Xamarin.Forms extension that can be hooked into for this in a more generic way to handle screen reader updates across the board, especially for container/layout visibility changes.
@mportune-bw , any thoughts/ideas on this one?
After some investigation, I think this could be done much cleaner with a custom renderer to set the native iOS property However, in the course of testing a solution to this, I upgraded the Xamarin.Forms package from 4.5.0.725 to 5.0.0.1874 (latest release), and this seems to have fixed the bug entirely. To make sure, I cloned a fresh copy of the mobile repo, fetched nuget packages, upgraded Xamarin.Forms, and with no other changes the bug disappeared on my iPhone 6 (iOS 12.5). Can someone else verify this - perhaps on a newer model iPhone? |
Bumps to Forms require a fair amount of regression testing before we can ship. I'm using 5.x in a work branch and it touches a lot coming from 4.5.x. If also fixes this bug entirely we should probably hold off on this PR. |
Agreed... @eliykat , let's hold off on this one since it appears the update Matt is already working on will resolve this issue. Good find on that! |
Closing this, as the changes in this PR are unlikely to be relevant once the Xamarin Forms upgrade is complete. |
Objective
Bugfix for #1197:
The cause of the bug was that VoiceOver (the iOS screenreader) reads invisible elements (i.e. those with
IsVisible="False"
). However,IsVisible
is the primary means for showing/hiding relevant/irrelevant fields and controls.Code Changes
Whether an element is “visible” to VoiceOver is determined by a separate property,
AutomationProperties.IsInAccessibleTree
. However, unlikeIsVisible
, this does not affect child items, so it cannot effectively be applied to a parentStackLayout
to hide its children from VoiceOver.I have therefore generally taken the following approach:
IsVisible
is set on an individual element, setIsInAccessibleTree
on that element with the same value.IsVisible
is set on a layout element, addIsInAccessibleTree
to each child with the same value as the parent.Issues
The Add URI button is still being picked up by VoiceOver on the AddEdit page, even when it's invisible and
IsInAccessibleTree
is set toFalse
. I figure I'd looked at this long enough, maybe someone else can spot what's going on.Other than that, I have tested this on my iPhone 6 and it all works as expected.