Skip to content

[material_ui] Fix ExpansionTile nested WidgetSpan semantics assertion - #12383

Closed
ahamSel wants to merge 1 commit into
flutter:mainfrom
ahamSel:fix/material-ui-expansion-tile-widgetspan-semantics
Closed

[material_ui] Fix ExpansionTile nested WidgetSpan semantics assertion#12383
ahamSel wants to merge 1 commit into
flutter:mainfrom
ahamSel:fix/material-ui-expansion-tile-widgetspan-semantics

Conversation

@ahamSel

@ahamSel ahamSel commented Aug 6, 2026

Copy link
Copy Markdown

Superseded by #12765, which contains the rebased fix and the simpler test requested in flutter/flutter#190639. This PR remains closed because GitHub cannot reopen it after the branch was rebased. The description and validation below refer to this PR's original diff.

On Android, ExpansionTile wraps its tile in a live-region Semantics node that uses AccessibilityFocusBlockType.blockNode. When the title contains a nested WidgetSpan, that live region can merge into the surrounding semantics tree and trigger a sibling-configuration conflict assertion.

This makes the live region a semantics container, so blockNode applies to an explicit node. It also adds an Android regression test using the reported nested WidgetSpan structure. The test fails with the original !conflict assertion when the production change is removed and passes with the fix.

Fixes flutter/flutter#188298.

This ports flutter/flutter#190639 to material_ui, where Material development is moving during the framework code freeze.

Pre-Review Checklist

Validation performed:

  • flutter test test/expansion_tile_test.dart
  • flutter analyze lib/src/expansion_tile.dart test/expansion_tile_test.dart

The release metadata uses material_ui's batch-release convention: a pending changelog entry with version: patch.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

Footnotes

  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. 2

@github-actions github-actions Bot added triage-framework Should be looked at in framework triage p: material_ui labels Aug 6, 2026
@Piinks

Piinks commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Hi @ahamSel thanks for contributing! This package is not accepting contributions yet, so I am going to close this PR for now. We will be letting folks know when we are ready for contributions, the PR you have open in flutter/flutter is perfect. We'll be letting everyone know there when we are ready. Thanks!

@Piinks Piinks closed this Aug 7, 2026
@ahamSel ahamSel changed the title [material_ui] Fix ExpansionTile nested WidgetSpan semantics assertion [material_ui] Fix ExpansionTile WidgetSpan semantics assertion Sep 5, 2026
@ahamSel ahamSel changed the title [material_ui] Fix ExpansionTile WidgetSpan semantics assertion [material_ui] Fix ExpansionTile nested WidgetSpan semantics assertion Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

p: material_ui triage-framework Should be looked at in framework triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ExpansionTile semantics assertion with nested WidgetSpan title in Flutter 3.44.2

2 participants