Repository navigation
Conversation
There was a problem hiding this comment.
Code Review
This pull request addresses an accessibility issue on iOS where VoiceOver announcements for tab selections were being suppressed. The change modifies accessibility_bridge.mm to prevent sending a screen-changed notification when a route change involves an unnamed route. This is achieved by checking if the route name has a positive length before posting the notification. A new test case has been added in accessibility_bridge_test.mm to verify this new behavior.
| ios_delegate_->PostAccessibilityNotification( | ||
| UIAccessibilityLayoutChangedNotification, | ||
| (routeChanged || next != lastFocused) ? next.nativeAccessibility : NULL); | ||
| (shouldAnnounceRoute || next != lastFocused) ? next.nativeAccessibility : NULL); |
There was a problem hiding this comment.
This change from routeChanged to shouldAnnounceRoute is correct for the fix. However, it makes the comment on lines 224-226 slightly outdated. The comment states, 'If there is a route change, we always refocus,' but with this change, refocusing only happens for named route changes. It would be beneficial to update the comment to reflect this new behavior to prevent future confusion.
|
This is still in my review list. will get to it soon |
|
from triage: @chunhtai do you have time to take another look? thanks |
|
still in my queue, will take a look today or tmr |
|
The last after messes up VoiceOver audio playback when switching between screens. Navigator.push and Navigator.pop would naturally send events about transitioning between screens or something similar, which is the case in every native app on iOS, just to at least open any app or open new settings screens. |
|
from triage: @chunhtai is this still on your radar? |
|
Is there any chance we could look into 3-finger scrolling while we're modifying this code? |
|
@chunhtai Thanks for the suggestion. I updated the fix, and it now covers these cases:
Here is the result: ScreenRecording_05-01-2026.22-10-11_1.MP4 |
|
For example, a |
|
Gentle nudge @chunhtai (from triage) Your comments have been replied. |
chunhtai
left a comment
There was a problem hiding this comment.
code lgtm, just some comment on the doc
chunhtai
left a comment
There was a problem hiding this comment.
LGTM, left a minor comment
|
oh didn't realize this was affected by code freeze. In that case we should wait until the code freeze is lifted and migrate this pr to the material_ui and cupertino_ui library |
|
converting this to draft |
Co-authored-by: chunhtai <[email protected]>
|
I've marked this PR as not ready to port to flutter/packages yet. The changes not in the material or cupertino libraries will remain here. |
|
Advice for PR splitting: Since this touches material/cupertino along with other parts of flutter/flutter, it will need to be split up. If the material/cupertino changes are dependent on the other non-material/cupertino changes in this PR, then the material/cupertino changes will need to wait for them to roll to stable before they can be ported over to material_ui/cupertino_ui in flutter/packages (which uses the stable branch).
|
|
If you would like to return to this, material_ui and cupertino_ui are now accepting contributions. :) The portions of this PR that affect the material and cupertino libraries can be ported over to flutter/packages, although they may have to wait for the changes in the core SDK to land here and reach stable first. Guidance and instructions for easily porting over can be found in #188444 |
|
I created direct PR for Material and Cupertino libraries: |
|
And finally the is fix is now merged to the Material and Cupertino UI libraries. Thanks everyone on helping me resolve the issue. Closing this PR now. |
…er#192550) flutter/packages@36e088a...8a35b16 2026-09-10 [email protected] [material_ui] Migrate M3 buttons template to use new gen_defaults (flutter/packages#12744) 2026-09-09 [email protected] [cupertino_ui]Add awaitNotRequired to Future-returning callsites without await (flutter/packages#12817) 2026-09-09 [email protected] [material_ui] Add awaitNotRequired annotation to material_ui (flutter/packages#12622) 2026-09-09 [email protected] [image_picker] Add native tests for photo-library access and UIImagePicker completion (flutter/packages#12540) 2026-09-09 [email protected] [material_ui][cupertino_ui] allow page routes to opt out of route semantics - flutter#182556 (flutter/packages#12674) 2026-09-09 [email protected] [image_picker] Add native tests for pick results, camera access, and presentation (flutter/packages#12539) 2026-09-09 [email protected] [cupertino_ui] Fix platform view sheet transitions (flutter/packages#12565) 2026-09-09 [email protected] [camera_android_camerax] Bump cameraxVersion to 1.6.2, remove concurrent-futures workaround (flutter/packages#12698) 2026-09-09 [email protected] `[material_ui]` replace identical checks with equality when dealing with enums (flutter/packages#12633) 2026-09-09 [email protected] Roll Flutter from b444e78 to 63b9518 (21 revisions) (flutter/packages#12814) 2026-09-09 [email protected] `[cupertino_ui]` replace identical checks with equality when dealing with enums (flutter/packages#12632) 2026-09-09 [email protected] [pigeon] add support for multiple swift outputs (flutter/packages#12720) If this roll has caused a breakage, revert this CL and set the roller to dry run mode using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
This PR addresses issue where selected tab is not announced by VoiceOver. When the route changes due to switching between tabs, iOS was still getting a screen-changed notification when a route change has no route name, which can suppress the selected-tab VoiceOver announcement.
iOS Behavior:
ScreenRecording_02-17-2026.21-25-37_1.MP4
before.MP4
after.mov
Resolves #168915
Test Scenario:
1- Build screen version 1: it has a route with no name, and one item.
2- Put focus on that item.
3- Apply
UpdateSemantics4- Clear previously captured notifications.
5- Build screen version 2: route changes to another route with no name, but same focused item stays.
6- Apply another
UpdateSemanticsExpected result:
UIAccessibilityLayoutChangedNotification.NSNull(so no route name is spoken).Pre-launch Checklist
///).