Repository navigation
[material_ui][cupertino_ui] allow page routes to opt out of route semantics - #182556 - #12674
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds an includeRouteSemantics option (defaulting to true) to CupertinoPageRoute, CupertinoPage, MaterialPageRoute, and MaterialPage, allowing them to opt out of introducing a semantics route scope. The review feedback suggests making the underlying _includeRouteSemantics getter public on both CupertinoRouteTransitionMixin and MaterialRouteTransitionMixin. This change would allow custom routes to override the property, simplify the overrides in the route and page classes, and enable reusing the documentation template via macros.
|
Thank you for your contribution! Because of the volume of PRs we receive, we require that new contributors use our checklist to guide them through critical steps in creating a Flutter PR. Please edit the PR description to add the checklist, then ensure that you have completed all of the steps. |
…antics - #182556 (flutter#12674) Nested navigators may use routes to update only part of the visible screen. However, Material and Cupertino page routes currently introduce a semantics route scope, causing screen readers to treat these updates as navigation to a new screen. This adds `includeRouteSemantics` to: - `MaterialPageRoute` - `MaterialPage` - `CupertinoPageRoute` - `CupertinoPage` The option defaults to `true`, preserving existing behavior. When set to `false`, the route content is not wrapped in a semantics node with `scopesRoute: true`. Tests cover both imperative routes and declarative pages. Fixes flutter/flutter#168915. ## Pre-Review Checklist [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
…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
Nested navigators may use routes to update only part of the visible screen. However, Material and Cupertino page routes currently introduce a semantics route scope, causing screen readers to treat these updates as navigation to a new screen.
This adds
includeRouteSemanticsto:MaterialPageRouteMaterialPageCupertinoPageRouteCupertinoPageThe option defaults to
true, preserving existing behavior. When set tofalse, the route content is not wrapped in a semantics node withscopesRoute: true.Tests cover both imperative routes and declarative pages.
Fixes flutter/flutter#168915.
Pre-Review Checklist
[shared_preferences]///).Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2