-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[iOS|Android] Fix screen reader order #9702
Conversation
This comment has been minimized.
This comment has been minimized.
For us, this is not an issue (as we don't intend to use |
// use OS default--there's no need for us to keep going if there's one or fewer tab indexes! | ||
if (tabIndexes.Count <= 1) | ||
return base.FocusSearch(focused, direction); | ||
|
||
int tabIndex = element.TabIndex; | ||
AView control = null; | ||
int attempt = 0; |
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.
@samhouts looking at the below code, it looks like the discovery of the next tab stop in the do while loop will only happen once, as maxAttempts = 0, and attempt starts at 0 but will be 1 at this stage, am I missing something?
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.
Ah sorry missed the out in the extension
@samhouts hate to bring up the old "when will this be out", but.... when do you expect this to be out? We need to rely on this change for our upcoming release, which realistically means it being part of a 4.5 patch with 1-2 months. If this is not realistic, can you give an estimate of when it may be part of an official release so we may plan? Assuming it will indeed be merged to 4.5 and not 4.4 |
@arevellfraedom So, first, whenever we merge something to a release branch like 4.4.0, it gets merged up through all the active releases and then to master. Thus it will be in 4.4.0, 4.5.0, and 4.6.0, and in the nightlies from master. Second, I can't make any promises about release dates, but yes, this has a high probability of being released within two weeks. 🤞 |
That would be amazing and I highly appreciate the effort. This change is very positive and will improve the accessibility of probably 90% of Xamarin forms apps, which I’m sure those users affected will very much appreciate. I will put some effort in shortly to look beyond the cases we don’t specifically need, but others might, to see if I can provide any more feedback to ensure this PR is as good as possible. |
Hi @samhouts - I have done additional validation of the keyboard tabbing on Android and have a couple of observations. These are all using https://github.com/xamarin/xamarin-forms-samples/tree/master/UserInterface/Accessibility: Bold = fail 4.4.0.993041
4.4.0.991757
3.6.0
Summary 4.4.0.993041 is still good for us, but does restore full 3.6.0 functionality |
@arevellfraedom Thank you so much for the detailed test and review!! Given this does improve behavior, we'll merge it, and then we'll continue working on the remaining issues you mention. The basic problem is that once we override the accessibility tree in iOS, we're stuck with that, even if we don't need to alter it. I'm having trouble finding a way to accurately reproduce it, since iOS doesn't seem to expose it. If ANYONE has has success with that, I'd love to hear what you did! Thanks to EVERYONE who has been pushing this area forward, either by your reports, testing, review, etc!! |
@samhouts , if I understand the issue you are facing with iOS correctly, I may be able to help. I see two options:
So to make this useful, the first thing to determine is when to call it - the good news is that the answer is "any time before voiceover scans the page". So ViewDidLoad for example is just fine. So simply go through the logic of TabStop and TabIndex, and when you are ready, call The second thing is to know how to call it - this is not so easy as this method is so strange it does not appear on the
Hopefully I have understood the question and that gives you some new options. |
Will this show up in Xamarin.Forms 4.5 soon? |
This should be available in the nuget that went out yesterday. @samhouts correct me if I'm wrong |
Yep, that's correct. It's now available in the latest 4.4.0, 4.5.0, and 4.6.0 releases. Thanks! |
@samhouts Im not seeing any major difference in accessibility behavior on the latest stable of 4.5, however I am seeing a significant improvement on the 4.6 pre-release |
@rnic99 You tried 4.5.0.495 and there was no difference? |
@samhouts Yep pulled down 4.5.0.495 this morning and the behavior was identical. I should also point out I was testing on an iPhone 6 with iOS version 12 and a OnePlus 3t with android 9. |
It would appear 4.5 SR2 was taken shortly before this PR was merged, although I cannot be sure |
4.5.0.495 was release-4.5.0-sr2.2, and this commit is in it. That's strange. |
@samhouts I just re-downloaded the stable release and it seems to be working fine on Android, and iOS. Or atleast its showing the same behavior as it was in 4.6 pre. My apologies for the confusion. I have a feeling there was a problem where even though it was showing 4.5 under my XF packages it was still deploying as 4.4. |
@rnic99 Phew! I was hoping that was the case. Thanks for checking again!! |
@samhouts of course, sorry for causing distress |
Description of Change
Enabled = false
orIsAccessibilityElement = false
.Issues Resolved
API Changes
These are breaking API changes, but they drive me crazy. I will revert if someone has an issue with this.
TabIndexExtensions
:Platforms Affected
Behavioral/Visual Changes
None
Before/After Screenshots
Not applicable
Testing Procedure
PR Checklist