Repository navigation
Commit 1f55bfa
authored
[material_ui] Fix ExpansionTile WidgetSpan semantics assertion (flutter#12765)
On Android, embedding an `ExpansionTile` in a `WidgetSpan` can trigger a sibling-configuration conflict assertion when semantics are enabled. Its live-region `Semantics` uses `AccessibilityFocusBlockType.blockNode` but can merge into the surrounding semantics tree.
This makes the live region a semantics container, so `blockNode` applies to an explicit node. The regression test uses the simpler reproduction suggested in flutter#190639 and relies on the semantics handle managed by `testWidgets`.
Fixes flutter#188298.
This ports flutter#190639 to `packages/material_ui`. The earlier package PR, flutter#12383, was closed while contributions were paused. On October 2, I rebased this replacement onto current `main` (`10cde9a3b`) to refresh its stale CI configuration. The contribution itself is unchanged: the semantics fix, its regression test, and a pending changelog entry. There are no custom CI changes in this PR.
I used AI to help with the fix and regression test.
## Pre-Review Checklist
Local validation after the October 2 rebase, on macOS with the already-installed Flutter 3.47.5 / Dart 3.13.4:
- Full `material_ui` suite: `flutter test --no-pub --concurrency=2` — 8,222 passed, 12 existing skips, no failures.
- Full example suite: `flutter test --no-pub --concurrency=1` in `packages/material_ui/example` — 406 passed, two existing skips, no failures.
- ExpansionTile file separately: 64 passed, one existing skip (also included in the full suite).
- Defaults generator suite: `dart test` — 72 passed.
- Full-package `flutter analyze --no-pub`: no issues.
- Dart formatting and `git diff --check`: passed.
- `dart run script/tool/bin/flutter_plugin_tools.dart validate --packages material_ui --check-for-missing-changes --base-branch upstream/main`: passed.
I repeated the regression's fail-without-fix check on the rebased branch: removing `container: true` produces the original `!conflict` assertion; restoring it makes the test pass. The existing `flutter_goldens` harness skips golden-image comparisons; I did not change that behavior. These are local test results, not a claim that repository-wide CI has passed.
GitHub automatically removed the `CICD` label after the October 2 push. Could a maintainer reapply it for the refreshed head so the repository presubmits can run?
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](https://developers.google.com/gemini-code-assist/docs/review-github-code). 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.
[^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.1 parent d0bf954 commit 1f55bfa
3 files changed
Lines changed: 31 additions & 1 deletion
File tree
- packages/material_ui
- lib/src
- pending_changelogs
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
696 | 696 | | |
697 | 697 | | |
698 | 698 | | |
699 | | - | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
700 | 702 | | |
701 | 703 | | |
702 | 704 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2230 | 2230 | | |
2231 | 2231 | | |
2232 | 2232 | | |
| 2233 | + | |
| 2234 | + | |
| 2235 | + | |
| 2236 | + | |
| 2237 | + | |
| 2238 | + | |
| 2239 | + | |
| 2240 | + | |
| 2241 | + | |
| 2242 | + | |
| 2243 | + | |
| 2244 | + | |
| 2245 | + | |
| 2246 | + | |
| 2247 | + | |
| 2248 | + | |
| 2249 | + | |
| 2250 | + | |
| 2251 | + | |
| 2252 | + | |
| 2253 | + | |
| 2254 | + | |
| 2255 | + | |
| 2256 | + | |
| 2257 | + | |
2233 | 2258 | | |
2234 | 2259 | | |
2235 | 2260 | | |
| |||
0 commit comments