This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
iOS: A11y only disable during app resigning to background when voice over on #32820
Merged
fluttergithubbot
merged 2 commits into
flutter:main
from
cyanglaz:a11y_only_disable_when_voice_over_on
Apr 29, 2022
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
What about when someone is using a physical switch device or voice input? Does this break things in those cases?
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.
/cc @chunhtai
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.
this looks like it will break if voice control is turned on, unfortunately there isn't an API to detect whether voice control is on last time i checked
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.
Could we flip the sense of this and allow tests to pass some parameter/set some environment variable to override this behavior?
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.
Do we need
self.view.accessibilityElementsHidden = YES;
if voice input is on? I rememberself.view.accessibilityElementsHidden = YES;
is to fix the exact issue where the voice over is on and the focus is jumped to flutter view.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.
So in the current code, we always hide accessibility elements. Now, with the change in this PR, we only hide the elements when voice over is turned on. This would actually be an improvement for voice input (by not hiding a11y elements when voice over is off)
I couldn't find any concrete example for voice input to test tho.
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.
@chunhtai @dnfield Friendly ping. Did my comment make sense? I'm happy to schedule a quick VC to discuss this :)
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.
I think the concern is whether "showing" the a11y elements when a dialog is up will confuse voice input.
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.
I think it's probably fine, but it would be good to test an app that has voice input turned on while it shows a permissions dialog, and make sure you can use voice input there the same as you would be able to use it in a regular native iOS app in that situation. I'm not familiar enough with voice input to know how to test this myself.
If a manual test shows that it works ok, that's probably the best we can do. If not then we need to figure out how to change this only for tests.
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.
Tested with voice control, it seems working fine. See below video:
https://drive.google.com/file/d/14DErLf2G_f_cfd6miU-DyJIhzMBWIW0L/view?usp=sharing